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:
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,
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.
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 ;)