Geospatial with Teradata 13

Extensibility
Extensibility covers the mechanisms by which you, as the user or developer, can extend the functionality of the Teradata Database, for example with the use of User Defined Functions, or UDFs.
Teradata Employee

Geospatial with Teradata 13

The availability of Teradata's geospatial extension package in 2007 brought these location capabilities to Teradata 12, 6.2 and 6.1.  This package is still available as a free download from Teradata and when installed, adds geospatial functionality as a User Defined Type (UDT) along with a library of User Defined Functions (UDFs).  (See my article on downloading and installing this package).  One of the major highlights of Teradata 13 is the inclusion of these geospatial features as native types and functions.  Geospatial is now available 'out of the box' on all TD 13 platforms.  And the performance is greatly enhanced - 300% improvement is the average performance gain that we see across a wide range of uses.  Geospatial functions now execute as native functions, not external UDFs, greatly reducing the overhead associated with their execution.

What's New with Teradata 13 Geospatial?

As discussed above, performance is greatly improved with Teradata 13 geospatial.  Another major highlight is the increased size of supported geometry objects.  With the first release, spatial objects could contain upto 2,500 vertices each.  That is still a pretty large number, think of a polygon with 2,500 vertices or a linestring.  Teradata 13 increases that limit to 1,000,000!  For an example, think of the coastline of California.  With 2,500 vertices, a fairly detailed coastline could be represented.  But now with a million vertices possible, the level of accuracy can be increased by a factor of 400!

To support these larger objects, the underlying implementation of the ST_Geometry datatype was changed from varbytes (with their 64K limit) to Large Objects (LOBs).  Unfortunately, this change does pose some load/unload challenges, as LOB support is mixed with some of our load tools.  I'll follow-up with another article to address these changes.  Until then, let me point you to the latest Geospatial Utility package.

Two notable changes were also made to the geospatial datatypes supported.  First, the ST_Point datatype was dropped in Teradata 13.  Points can be defined with ST_Geometry using the 'Point(x y)' format.  The other change is the addition of a Teradata extension to the SQL/MM standard.  This new datatype is ST_GeoSequence.  This is an array datatype, combining datetime stamps with location.  ST_GeoSequence is supported by some library methods which allow calculations such as average speed between points in the array as well as time of day distance calculations.

Conclusion

Teradata 13 is a great step forward for Teradata geospatial features.  Including ST_Geometry and its supporting library as native Teradata features means that all TD 13 platforms can leverage location intelligence without any additional installation and deployment steps.  Performance from the first release has also been greatly increased, as well as the size of geometry objects supported.  Teradata Express 13 is available as a free download, so I encourage you to get a copy today and start exploring Teradata Geospatial.  A great place to start is my geospatial introduction article.

Tags (2)
1 REPLY
Teradata Employee

Re: Geospatial with Teradata 13

Is there no need to install the geospatial package when I use the teradata 13?
I've run a piece of ddl to create a table with ST_Geometry, and the table is created well.
but it failed when I run some sql to insert data towards that table as below.
CREATE VOLATILE MULTISET TABLE shapes ( id INTEGER NOT NULL PRIMARY KEY, geometry ST_GEOMETRY );
INSERT INTO shapes VALUES (1,'Point(2 2)');
INSERT INTO shapes VALUES (2,'Point(8 7)');
The message told me that 2 rows have been inserted, but result of count is 0.
sel count(*) from shapes; result=0
should I add some other features? by the way, there is no fastload on my environment.