Geospatial Error

Database

Geospatial Error

The following query is returning a 7548 Error... 13 ST_Transform: Error in call to transform To.  I'm new at geospatial and not sure what the problem is.  Can someone assist?

The query is based on a blog by Teradata Mike... http://developer.teradata.com/extensibility/articles/putting-geospatial-on-the-map-part-i

SELECT

WL1.UWI,

WL1.WELL_NAME,

WL2.UWI,

WL2.WELL_NAME,

WL1.WELL_GEO_POINT.ST_TRANSFORM(SRS_1.SRTEXT,SRS_2.SRTEXT).ST_DISTANCE(WL2.WELL_GEO_POINT.ST_TRANSFORM(SRS_1.SRTEXT,SRS_2.SRTEXT))*.6/1000 AS MILES

FROM  Lab_IDW_LAB_COMPRESSION.WELL_GEO_LOCS WL1, Lab_IDW_LAB_COMPRESSION.WELL_GEO_LOCS WL2,    

     SYSSPATIAL.SPATIAL_REF_SYS SRS_1,

     SYSSPATIAL.SPATIAL_REF_SYS SRS_2

WHERE WL1.UWI != WL2.UWI

AND  SRS_1.AUTH_SRID = 32616

1 REPLY

Re: Geospatial Error

Solved...

SELECT

WL1.UWI,

WL1.WELL_NAME,

WL2.UWI,

WL2.WELL_NAME,

WL1.WELL_GEO_POINT.ST_TRANSFORM(SRS_1.SRTEXT,SRS_2.SRTEXT) .ST_DISTANCE(WL2.WELL_GEO_POINT.ST_TRANSFORM(SRS_1.SRTEXT,SRS_2.SRTEXT))*.6/1000 AS MILES

FROM  Lab_IDW_LAB_COMPRESSION.WELL_GEO_LOCS WL1, Lab_IDW_LAB_COMPRESSION.WELL_GEO_LOCS WL2,   

     SYSSPATIAL.SPATIAL_REF_SYS SRS_1,

     SYSSPATIAL.SPATIAL_REF_SYS SRS_2

WHERE WL1.UWI != WL2.UWI

AND  SRS_1.AUTH_SRID = 32616

AND SRS_2.AUTH_SRID = 4326