# Projection Problem on Oracle Spatial

I would like to transform SDO_GEOMETRY from WGS84 projection to my custom projection in Oracle Database.

Details for custom projection is as follows:

``````+proj=lcc +lat_1=40.5 +lat_2=37.5 +lat_0=25 +lon_0=36 +x_0=1003827.11 +y_0=-1183453.08 +datum=WGS84 +units=m +no_defs

PROJCS["Customized Lambert",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["standard_parallel_1",40.5],
PARAMETER["standard_parallel_2",37.5],
PARAMETER["latitude_of_origin",25],
PARAMETER["central_meridian",36],
PARAMETER["false_easting",1003827.11],
PARAMETER["false_northing",-1183453.08],
UNIT["Meter",1]]'
``````

Running SDO_CS.VALIDATE_WKT for custom projection returns TRUE. But,

``````SELECT SDO_CS.TRANSFORM(SDO_GEOMETRY('POINT(29 41)',8307),1000003006) FROM DUAL;
``````

returns with ORA-13282 & ORA-06512 errors.

What is the problem here ?

• What database version do you use ? And how did you define this custom system - what SQL did you use for that ? – Albert Godfrind Jan 11 '16 at 7:30

The problem comes from the projection name. In Oracle, the proper name for the 2SP Lambert Conformal Conic projection is "Lambert Conformal Conic" (notice: no "2SP", spaces instead of underscores).

The following definition will work:

``````'PROJCS["Customized Lambert",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Lambert Conformal Conic"],
PARAMETER["standard_parallel_1",40.5],
PARAMETER["standard_parallel_2",37.5],
PARAMETER["latitude_of_origin",25],
PARAMETER["central_meridian",36],
PARAMETER["false_easting",1003827.11],
PARAMETER["false_northing",-1183453.08],
UNIT["Meter",1]]'
``````

When defining a new SRID using the well-known text notation, Oracle is flexible in the way you name the projection parameters (capitalized or not, underscores or spaces) but is stricter for the actual names of the projections.

``````SQL> SELECT SDO_CS.TRANSFORM(SDO_GEOMETRY('POINT(29 41)',8307),1000003006) FROM DUAL;

SDO_CS.TRANSFORM(SDO_GEOMETRY('POINT(2941)',8307),1000003006)(SDO_GTYPE, SDO_SR
-------------------------------------------------------------------------------
SDO_GEOMETRY(2001, 1000003006, SDO_POINT_TYPE(415303.239, 628045.739, NULL), NULL, NULL)

1 row selected.
``````