* Copyright 2022-2023 Teradata.  All rights reserved.
----------------------------------------------------------------------------------------------------------
* README
* Release Notes for Teradata GeoSpatial Tool version 20.00.00.000
----------------------------------------------------------------------------------------------------------
Description:
----------------------------------------------------------------------------------------------------------

Enhancement and problem fixed by this release are listed below:

Teradata GeoSpatial Tool version 20.00.00.000
=============================================

SA-54335 :  Process and Test 20.00 TDGEOSPATIAL builds

To work with Teradata GeoSpatial  Import / Export Tool, user must set several 
environment variables that are specific to the Tool and Java runtime environment.

Contents
----------------------------------------------------------------------------------------------------------
  o geojni.dll                            - Library for Teradata GeoSpatial Tool.
  o tdgeospatial.jar                      - Jar file for Teradata GeoSpatial Tool to 
                                            read/write Geo Spatial data from/to shape data files.  
  o tdgeospatial_charsets.properties      - Properties file for Teradata and Java Character 
                                            Sets mapping.  
System Requirements and Dependencies
----------------------------------------------------------------------------------------------------------
  o JDK Version: JDK1.6 or above
  o gdal libraries (1.11.0) to handle read/write spatial shape files like TIGER, ESRI, and KML etc.
  o Latest Teradata JDBC drivers should be installed.(terajdbc4.jar)  

Setting up path and environment variables manually
----------------------------------------------------------------------------------------------------------
 Windows Configuration
 =====================
      64 bit Teradata GeoSpatial  on 64-bit machine:
      ==============================================		  
      set PATH=C:\Program Files\Teradata\Client\<version>\tdgeospatial;%PATH%

      If JDBC libraries are installed in C:\jdbc (location of above jar files) then
      set JDBC_LIB_PATH=C:\jdbc
      set CLASSPATH=C:\Program Files\Teradata\Client\17.10\bin\tdgeospatial.jar;%CLASSPATH%
      set CLASSPATH=%JDBC_LIB_PATH%\terajdbc4.jar;%CLASSPATH% 	  
	  
TDGeoExport Command line options:
=================================
TDGeoExport Data Export Program Convert geospatial data from the database into 
ESRI, TIGER/Line, MAPINFO and KML data.

                -l logon_string -s database_name -t table_name
                -f format_name -o output_directory_name [-n layer_name] 
				[-a_srs coordinate_system]
Where:

    -l logon_string: the Teradata Database logon string, where the format
                     of logon_string is: Database/User,Password

    -s database_name: the database name that contains the table to convert
    -t table_name: the table name (or view) to convert

    -f format_name: Output file format name.  The possible values are as follows:
                    -f "ESRI Shapefile" shape_type [only]
                    -f "TIGER" version_code
                    -f "MapInfo File"
	            -f "KML"

    -o output_directory_name: the directory where the output data files will be generated

    -n layer_name: the name of the layer to create (defaults to the table name)
	
    -a_srs coordinate_system_name: the coordinate system for exported geospatial data

TDGeoExport Demonstration:	
==========================
	java -Xms256m -Xmx512m -classpath .;C:\jdbc\terajdbc4.jar;C:\Program Files\Teradata\Client\20.00\bin\tdgeospatial.jar;
         com.teradata.geo.TDGeoExport  -l geodbs/geouser,geouser -s geouser -t customers -f "ESRI Shapefile" point -o c:\temp\geodata -n customers 


TDGeoImport Command line options:
=================================

TDGeoImport Data ImportProgram Convert TIGER/Line, ESRI and MAPINFO data into 
geospatial data for the database

        -l logon_string -s database_name -f data_source_name [-m]
		[-n layer_name] [-c char_mapping] [-k keyword_mapping]
		[-p primary_index_mapping] [-a_srs coordinate-system]
		[-FLOAD load_type] [-BSIZE rows_in_batch]

Where:
	-l logon_string: the Teradata Database logon string, where the format
                     of logon_string is: Database/User,Password
	
	-s database_name: the database name where the data will be imported to
	
	-f data_source_name: file or directory with the data files
	
	-m: If present, tables imported to will be MULTISET; if NOT, tables will be SET
	
	-n layer_name: the name of the layer to import. If not present, all layers
				   in the data source will be imported.
	
	-c char_mapping: a text file containing a mapping of illegal characters found in the 
                  data source to legal characters for the database. The file should contain one entry 
                  per line in the form: 
                  illegal_character => legal_character
        -k keyword_mapping: a text file containing a mapping of illegal keywords found in 
               the data source to legal keywords for the database. The file should contain one entry 
               per line in the form:
			illegal_keyword => legal_keyword
							
	-p primary_index_mapping: a text file containing a mapping of user defined primary 
                indexes for a certain layer. The file should contain one entry per line in the form:
			layer_name => primary_index
	
	-a_srs coordinate_system: the coordinate system for imported geospatial data. 
	Note that no transform is performed, the SRID of the GeoSpatial field is set to 
               the value of this parameter.
	
	-FLOAD load_type: 0 = fastLoad off; 1 = fastLoad on; 2= fastload on, logging on.
		  If not presemt, fastload is set to ON.
	
	-BSIZE rows_in_batch: number of bytes of data in a batch insert
		  If not present, 30000000 bytes of data are in a batch insert.
	
TDGeoImport Demonstration:
==========================
	java -Xms256m -Xmx512m -classpath .;C:\jdbc\terajdbc4.jar;C:\Program Files\Teradata\Client\20.00\bin\tdgeospatial.jar;
        com.teradata.geo.TDGeoImport -l geodbs/geouser,geouser -s geouser -f c:\temp\geodata –n customers	
		
		
Note: -Xms256m -Xmx512m are JRE virtual machine options, for allowing more space for JRE.
      If CLASSPATH environment variable is properly defined, then -classpath parameter at runtime is not required.
