All Forums Extensibility
bramhanaidu 1 post Joined 02/13
03 Mar 2013
Geospatial data into Teradata Database


I am new to GeoSpatial data, I need to load Shape files into Teradata database. Could you please let me know what all the pre requisite softwares/utilities needs to be installed for loading this shape files into database.

Also suggest me on how the (.SHP, .SHX & .DBF) files are related to derive the geospacial data

Cliff L 1 post Joined 04/12
11 Mar 2013

Teradata has a free tool, TD GeoImport/Export, that translates Shape files into a format that can be stored in Teradata. You can find that here:
The following documentation provides more information about geospatial support:

  • SQL Geospatial Types, B035-1181-098A, available from
  • Teradata Spatial Release 13.0 User’s Guide, Teradata Orange Book 541-0007514, available when you register through Teradata @ Your Service from the Support Services link at


Willimoa 63 posts Joined 10/09
08 Aug 2013

It looks like the TDGeoImport and GeoExport tools aren't available anymore.   What's the status on these ?

ponko73 1 post Joined 02/14
ML500000 4 posts Joined 04/11
21 Mar 2014

I am trying to use this tool, but get an error message ...
C:\Users\ML500000\Desktop\TDGeoImportExport>java -Xms256m -Xmx512m -classpath .;
port\tdgssconfig.jar";. com.teradata.geo.TDGeoImport -l tdlocal/sysdba,sysdba -s
 sysdba -f C:\Users\ML500000\Desktop\StatPlanet_Germany\map\map.shp -n co99_d00
Error: Could not find or load main class com.teradata.geo.TDGeoImport

What am I doing wrong?
Thanks in advance,

Willimoa 63 posts Joined 10/09
30 Jun 2014

Hi Martin,
Did you solve this ?    
I see you're in C:\Users\ML500000\Desktop\TDGeoImportExport.  
The release notes say 
"Change to the TdGeoImportExport\bin directory and  ...."   so I"m guessing you're not in the bin directory.   Can you see a geojni.dll file ?    Change to the bin directory and run the same script again.

raulbenet 2 posts Joined 11/14
19 Dec 2014

I have table in Teradata Express that contains the countries of the world. The NAME column contains the country names and the GEOM colum contains their geographical information (the GEOM colum is of type ST_Geography). I created this table by importing a shapefile using Teradata's TDGeospatialImporter tool.
I am looking for a query that will return the list of countries that are contained in a particular boundingbox. So the boundingbox is the input and the GEOM column will be the output.
I came up with this query that does the job.
Select Name, GEOM from where
GEOM.ST_MBR_Xmin() >= Xmin AND
GEOM.ST_MBR_Ymin() >= Ymin AND
GEOM.ST_MBR_Xmax() <= Xmax AND
GEOM.ST_MBR_Ymax() <= Ymax;
where obvioulsly (Xmin,Ymin,Xmax,Ymax) is the boundingbox.
However, this is just a test and in reality we will be querying tables that contain potentially millions or rows. So I guess the question is how can I be sure this is the most efficient query? Is this query using Teradata's spatial index? I have no idea. Is there a similar query that would be much faster?
Also, my technology department tells me that if the output (the GEOM colum in this case) can be in WKB format it would be much faster and better for us. I have tried using the ST_WKBToSQL method but I am not sure that's what I need. I guess what I need is a function that converts the ST_Geometry type to WTB format, so my query would be something like SELECT CONVERT(ST_GEOMETRY_TO_WKB, GEOM) from blablabla
Can you give me a hand?
I guess there are two questions in the end, not just one ;)

You must sign in to leave a comment.