Teradata GeoExport Process - Geospatial Utilities

Teradata® Geospatial Utilities User Guide

Product
Geospatial Utilities
Release Number
17.10
Published
June 2021
Language
English (United States)
Last Update
2021-07-01
dita:mapPath
ngj1608578450889.ditamap
dita:ditavalPath
obe1474387269547.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.
    Include the terajdbc4.jar, tdgssconfig.jar and tdgeospatial.jar in the classpath.
    • 32-bit path:
      rm c:\temp\geodata\*
      cd c:\temp\TdGeoImportExport\bin
      java -Xms256m -Xmx1024m -classpath .;tdgssconfig.jar;terajdbc4.jar;"C:\Program Files(x86)\Teradata\Client\<version>\bin\tdgeospatial.jar";
      com.teradata.geo.TDGeoExport -l hyvm20/geouser, geouser -s geouser -t customers
      -f "ESRI Shapefile" point -o c:\temp\geodata -n customers
    • 64-bit path:
      rm c:\temp\geodata\*
      cd c:\temp\TdGeoImportExport\bin
      java -Xms256m -Xmx1024m -classpath .;tdgssconfig.jar;terajdbc4.jar;"C:\Program Files\Teradata\Client\<version>\bin\tdgeospatial.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.