geobrett73

Trouble with ST_Transform

Discussion created by geobrett73 on May 29, 2011
I have the following problem when performing a transformation. I've read the documentation for ST_Transform but I am none the wiser.  I need to transform from the geographic co-ordinate system to a corresponding projection co-ordinate system. They both use the same datum so they should be compatiable!

SELECT sde.st_srid( ap.geometry ) FROM asset_polygon ap where ap.asset_id = 6;
SELECT sde.st_transform( ap.geometry, 9 ) FROM asset_polygon ap WHERE ap.asset_id = 6;

SELECT sr.sr_name, sr.srid, sr.definition FROM sde.st_spatial_references sr where sr.srid in (2, 9);


SDE.ST_SRID(AP.GEOMETRY)
------------------------
2                       

Error starting at line 4 in command:
SELECT sde.st_transform( ap.geometry, 9 ) FROM asset_polygon ap WHERE ap.asset_id = 6
Error report:
SQL Error: ORA-20603: Spatial References are not compatible.
ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 788
ORA-06512: at "SDE.ST_GEOMETRY_OPERATORS", line 2577

SR_NAME                      SRID  DEFINITION
------------------------ ----- -----------------------------------------------------------------
GCS_GDA_1994               2 GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
GDA_1994_MGA_Zone_55 9 PROJCS["GDA_1994_MGA_Zone_55",GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",10000000.0],PARAMETER["Central_Meridian",147.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

Outcomes