Geospatial data into Teradata Database

Extensibility

Geospatial data into Teradata Database

Hi

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
6 REPLIES
Teradata Employee

Re: Geospatial data into Teradata Database

Hi,

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:

http://downloads.teradata.com/download/extensibility/teradata-geospatial

The following documentation provides more information about geospatial support:

  • SQL Geospatial Types, B035-1181-098A, available from http://www.info.teradata.com
  • 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 http://www.teradata.com
 

Enthusiast

Re: Geospatial data into Teradata Database

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

Thanks

Re: Geospatial data into Teradata Database

Teradata Employee

Re: Geospatial data into Teradata Database

Hi,

I am trying to use this tool, but get an error message ...

C:\Users\ML500000\Desktop\TDGeoImportExport>java -Xms256m -Xmx512m -classpath .;

"C:\Users\ML500000\Desktop\TDGeoImportExport\terajdbc4.jar";"C:\Users\ML500000\D

esktop\TDGeoImportExport\tdgssjava.jar";"C:\Users\ML500000\Desktop\TDGeoImportEx

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,

Martin

Enthusiast

Re: Geospatial data into Teradata Database

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.

Enthusiast

Re: Geospatial data into Teradata Database

Hello,

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 mstr.world 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 mstr.world blablabla

Can you give me a hand?

I guess there are two questions in the end, not just one ;)

Thanks!