15.10 - TDGeoExport - Teradata Database

Teradata Database SQL Geospatial Types

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1181-151K

Converts Teradata geospatial data into a format that is compatible with the ESRI, MapInfo, and TIGER/Line data formats.

 

Syntax element …

Specifies …

-l logon_string

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

   Database/User,Password

-s database_name

the name of the database that contains the table to convert.

-t table_name

the table name or view name to convert.

-f format_name

the output file format name. The valid values for format_name are:

  • MapInfo File
  • TIGER version_code
  • KML
  • ESRI Shapefile shape_type    [ ONLY ]
  • Exported ESRI shapefiles can contain only one shape type, which must be specified. If multiple shape types occur in the table that is to be exported, specify the optional ONLY keyword to restrict the export to only the specified type. Perform separate export operations to export several different shape types.

    -o output_directory_name

    the directory where the output data files are generated.

    -n layer_name

    the optional name of the layer to create.

    If the -n option is omitted, then TDGeoExport uses the table name as the name of the layer to create.

    -a_srs coordinate_system

    the coordinate system. If not specified, the default is to use the coordinate system appropriate to the output file format type.

    -a_srs can be specified as one of the four well-known systems (WGS84, WGS72, NAD83, NAD27) or in the form of EPSG:n where n is the EPSG GCS or PCS code.

    The table or view should consist of a single geometry column of type ST_Geometry and one or more additional columns that represent the feature attributes. Each row of the table is considered a feature and the entire table is considered a layer. All columns in the table are converted to the layer. To convert a subset of columns in the table instead of the entire table, create a view that represents the desired subset.

    The program places the output file or files in the directory specified by the -o command option.

    There can be at most one geospatial column in the table. BLOB and CLOB columns and UDT columns other than the ST_Geometry column are not supported.

    Assume there is a user named geo_user and a database called mydb on a system called geo_system. Table co99_d00 exists in mydb. It contains a column of type ST_Geometry.

    The user in this example is connecting to a Teradata Database system from a Windows client. On the client, the Teradata TDGeoImportExport Tools have been installed to directory:
    C:\tools\td-geoimportexport-1.5.

    To export the table to an ESRI shapefile named c099_d00 in the C:\data\demo\load directory:

    1 Navigate to the C:\tools\td-geoimportexport-1.5\bin directory.

    2 Execute the following command at the command line (note that this will overwrite any files of the same name in that directory):

    java -Xms256m -Xmx1024m -classpath .;tdgssconfig.jar;terajdbc4.jar; com.teradata.geo.TDGeoExport -l geo_system/geo_user,geo_pw -s mydb -t co99_d00 -f "ESRI Shapefile" point -o c:\data\demo\load -n co99_d00

    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.