How to install GeoImportExport utility to Teradata ?

Tools & Utilities

How to install GeoImportExport utility to Teradata ?

Hi

I downloaded GeoImportExport tool from Teradata download website, but i don't know how to install it into our windows machine.

Could someone help me with it ?

2 REPLIES
Teradata Employee

Re: How to install GeoImportExport utility to Teradata ?

There is no installation set up for Teradata GeoImportExport tool.

Extract zip file and you will find geojni.dll add the new directory to PATH variable.

You will also find a java package com\teradata\geo, add the directory contains this to CLASSPATH variable.

Alternately while executing you can include the same in -classpath variable as shown below.

I am here presenting example to run Export and Import samples.

===============================================================

TDGeoExport Demonstration

===============================================================

1. Create a table of geospatial data in the database

DROP TABLE stores;

CREATE TABLE customers(pkey integer, loc ST_Geometry, cust_name VARCHAR(120), cust_zipcode VARCHAR(5));

INSERT INTO customers(0, new ST_Geometry(POINT(20.34 80.78)), Fred Smith, 91234);

INSERT INTO customers(1, new ST_Geometry(POINT(20.56 89.44)), Richard Connor, 95421);

INSERT INTO customers(2, new ST_Geometry(POINT(19.12 88.22)), Anita Johnson, 98523);

INSERT INTO customers(3, new ST_Geometry(POINT(21.45 88.12)), Mary Willow, 90642);

SELECT * FROM customers ORDER BY 1;

2. Run TDGeoExport to create an ESRI shapefile from the customers table.

rm c:\temp\geodata\*

cd c:\temp\TdGeoImportExport\bin         You should extract files sent in zip file under this directory.

java -Xms256m -Xmx1024m -classpath .;terajdbc4.jar;tdgssjava.jar;tdgssconfig.jar; com.teradata.geo.TDGeoExport -l geodb/geouser,geouser -s test -t customers -f ESRI Shapefile point -o c:\temp\geodata -n customers

3. Validate that the ESRI shape files were generated in the c:\temp\geodata directory

The output ESRI shape files will show up in c:\temp\geodata

Options for TDGeoSpatial Export tool:

  -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.

===============================================================

TDGeoImport Demonstration

===============================================================

1. Drop the customers table from the database

DROP TABLE customers;

2. Run TDGeoImport to import the ESRI shape files into the DBS.

cd c:\temp\TdGeoImportExport\bin        You should extract files sent in zip file under this directory.

java -Xms256m -Xmx512m -classpath .;terajdbc4.jar;tdgssjava.jar;tdgssconfig.jar; com.teradata.geo.TDGeoImport -l geodb/geouser,geouser-s test -f c:\temp\geodata -n customers

3. Validate that shape files were loaded into customers table

SEL pkey, point (FORMAT X(20)), cust_name (FORMAT X(20)), cust_zipco FROM customers ORDER BY 1;

-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.

Note: You should install java jdk (1.6) on your machine.

c:\temp\TdGeoImportExport\bin\java -version

java version 1.6.0_41

Please do let me know if you find any issues in using the application.

N/A

Re: How to install GeoImportExport utility to Teradata ?

I'm trying to install and use TDGeoImport, but I am not understanding what is needed to install this correctly.  All I see in the zip file from http://downloads.teradata.com/download/database/td-geo-importexport-tool-32-bit , I see 4 jar files and 2 dll.  The java package com... I am not seeing.

What am I missing??

Thanks in advance...