Process - Geospatial Utilities

Teradata Geospatial Utilities User Guide

Product
Geospatial Utilities
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2519
lifecycle
previous
Product Category
Teradata Tools and Utilities

The following steps and examples describe how to import with the Teradata GeoImport utility.

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\binjava -Xms256m -Xmx512m -classpath.;"c:\Program Files\Teradata\Tdat\LTDBMS\bin\terajdbc4.jar";"c:\Program Files\Teradata\Tdat\LTDBMS\bin\tdgssjava.jar";"c:\Program Files\Teradata\Tdat\LTDBMS\bin\tdgssconfig.jar";.com.teradata.geo.TDGeoImport -l hyvm20/ geouser, geouser -s geouser -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_zipcoFROM customers ORDER BY 1;

where:

 

Parameter

Description

-l logon_string

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

-s database_name

Database name where the data will be imported to

-f data_source_name

File or directory with data files. Supports the following input file formats:

o ESRI Shapefiles

o MapInfo data sets in native TAB format

o U.S. Census Bureau TIGER/Line files

-m

f present, tables created will be MULTISET; if NOT, tables will be SET.

-c char_mapping

Text file containing a mapping of illegal characters found in data source to legal characters for the database. The file should contain one entry per line in the form:

illegal_character => legal_character

Example character map file:

$ => S

" " => ""

Note: relative / exact path of file should be char_mapping.

-k keyword_mapping

ext file containing a mapping of illegal keywords found in data source to legal keywords for the database. The file should contain one entry per line in the form:

illegal_keyword => legal_keyword

Example keyword map file:

FILE => _FILE

PRIVATE => _PRIVATE

PRECISION => _PRECISION

table => _table

select => _select

RTSQ => _myRTSQ

Note: relative / exact path of file should be keyword_mapping.

-p primary_index_mapping

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

Example Primary Index file:

landmarks => MODULE,LAND

AltName => TLID,RTSQ

Note: relative / exact path of file should be primary_index_mapping.

-a_srs coordinate_system

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. Default is NAD83.

-FLOAD load_type

Specifies FastLoad used while logging to database or not.

0 = fastload off; FastLoad not used while logging to database.

1 = fastload on; FastLoad is used while logging to database.

2= fastload on, FastLoad used and logging option turned on.

-BSIZE rows_in_batch

Number of bytes of data in a batch inserts.

If not present, 30000000 bytes of data are in a batch insert.

-CSET charset_name

Specifies the client character set while logging onto Teradata Database
If this parameter is not present, the default character set is assumed (ASCII for N/W clients).

Note: Applicable values are UTF8.

Note: Some large data files may exceed Java heap memory. In the example, the -Xms option sets the initial Java heap size to 256MB. The -Xmx option sets the maximum Java heap size to 1024 MB.

Geospatial will rename the column name as “POINT” for point type geometry and “GEOM” for all other types of geometry if it doesn’t receive a column name from the GDAL layer during import.