Teradata GeoExport Process - Geospatial Utilities

Teradata Geospatial Utilities User Guide

Product
Geospatial Utilities
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-07-02
dita:mapPath
nth1488824663194.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2519
lifecycle
previous
Product Category
Teradata Tools and Utilities

The following steps and examples describe how to export with Teradata GeoExport.

  1. Create a table of geospatial data in the database:

    DROP TABLE customers;
CREATE TABLE customers(pkey integer, cust_name VARCHAR(10),
cust_zipcode VARCHAR(6) , loc ST_Geometry);
INSERT INTO customers(0, 'Anugu Raju', '500020', new ST_Geometry('POINT(20.34 80.78)'));
INSERT INTO customers(1, 'Madhava', '500081', new ST_Geometry('POINT(20.56 89.44)'));
INSERT INTO customers(2, 'Karthik', '500083', new ST_Geometry('POINT(19.12 88.22)'));
INSERT INTO customers(3, 'Subbarao', '500012', new ST_Geometry('POINT(21.45 88.12)'));
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
java -Xms256m -Xmx1024m -classpath .;tdgssconfig.jar;terajdbc4.jar com.teradata.geo.TDGeoExport  -l hyvm20/geouser, geouser -s geouser -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.