This is a brief note on how to use Web Mercator (EPSG:3785) with database 11g and MapViewer.
Further details can be found in the Spatial and MapViewer documentation that is in
http://docs.oracle.com/cd/E16655_01/appdev.121/e17896/sdo_cs_concepts.htm#CIHJFBFG (Spatial), and
http://docs.oracle.com/cd/E28280_01/web.1111/e10145/vis_omaps.htm#BACDBCBI (MapViewer).
There are two options for using Web Mercator with MapViewer.
The first (and preferred option) is to use database version 11.2.0.3 (or later) and MapViewer 11.1.1.6 (or later) and use the ESPG:3857 srid instead. In order to do this the tile layer config definitions for the Google/Bing/OSM/Nokia etc. tile layers must be updated to change the SRID from 3785 to 3857.
If a database entry in user_sdo_cached_maps is used to specify the tile layer (and its config) then just update the stored definition in that view. For example, if the entry is
SQL> select name, definition from user_sdo_cached_maps where name='NOKIA_MAP';
NAME
--------------------------------
DEFINITION
--------------------------------------------------------------------------------
NOKIA_MAP
<map_tile_layer name="nokia_map">
<external_map_source url="" builtin_tile_layer="nokia">
<properties>
<property name="lib_url" value="http://api.maps.nokia.com/2.2.0/jsl.js"/>
<property name="key" value="your_api_key"/>
<property name="appId" value="your_appId"/>
<property name="map_type_values"
value="MVNokiaTileLayer.TYPE_NORMAL;MVNokiaTileLayer.TYPE_SATELLITE;MVNokiaTileLayer.TYPE_TERRAIN"/>
<property name="map_type_names" value="Normal;Satellite;Terrain"/>
<property name="default_map_type" value="MVNokiaTileLayer.TYPE_NORMAL"/>
</properties>
</external_map_source>
<coordinate_system srid="3785" minX="-2.0037508E7" minY="-2.0037508E7" maxX="2.0037508E7" maxY="2.0037508E7"/>
<tile_image width="256" height="256"/>
<zoom_levels levels="19" min_scale="0.0" max_scale="0.0" min_tile_width="76.43702697753906" min_tile_height="2.0037508E7">
<zoom_level level="0" name="" description="" scale="0.0" tile_width="2.0037508E7" tile_height="2.0037508E7"/>
<zoom_level level="1" name="" description="" scale="0.0" tile_width="1.0018754E7" tile_height="1.0018754E7"/>
<zoom_level level="2" name="" description="" scale="0.0" tile_width="5009377.0" tile_height="5009377.0"/>
<zoom_level level="3" name="" description="" scale="0.0" tile_width="2504688.5" tile_height="2504688.5"/>
<zoom_level level="4" name="" description="" scale="0.0" tile_width="1252344.25" tile_height="1252344.25"/>
<zoom_level level="5" name="" description="" scale="0.0" tile_width="626172.125" tile_height="626172.125"/>
<zoom_level level="6" name="" description="" scale="0.0" tile_width="313086.0625" tile_height="313086.0625"/>
<zoom_level level="7" name="" description="" scale="0.0" tile_width="156543.03125" tile_height="156543.03125"/>
<zoom_level level="8" name="" description="" scale="0.0" tile_width="78271.515625" tile_height="78271.515625"/>
<zoom_level level="9" name="" description="" scale="0.0" tile_width="39135.7578125" tile_height="39135.7578125"/>
<zoom_level level="10" name="" description="" scale="0.0" tile_width="19567.87890625" tile_height="19567.87890625"/>
<zoom_level level="11" name="" description="" scale="0.0" tile_width="9783.939453125" tile_height="9783.939453125"/>
<zoom_level level="12" name="" description="" scale="0.0" tile_width="4891.9697265625" tile_height="4891.9697265625"/>
<zoom_level level="13" name="" description="" scale="0.0" tile_width="2445.98486328125" tile_height="2445.98486328125"/>
<zoom_level level="14" name="" description="" scale="0.0" tile_width="1222.992431640625" tile_height="1222.992431640625"/>
<zoom_level level="15" name="" description="" scale="0.0" tile_width="611.4962158203125" tile_height="611.4962158203125"/>
<zoom_level level="16" name="" description="" scale="0.0" tile_width="305.74810791015625" tile_height="305.74810791015625"/>
<zoom_level level="17" name="" description="" scale="0.0" tile_width="152.87405395507812" tile_height="152.87405395507812"/>
<zoom_level level="18" name="" description="" scale="0.0" tile_width="76.43702697753906" tile_height="76.43702697753906"/>
</zoom_levels>
</map_tile_layer>
where the srid="3785" then update it using a SQL statement like
update user_sdo_cached_maps set definition = replace(definition, 'srid="3785"', 'srid="3857"')
where name='NOKIA_MAP';
If however the usage is via the OracleMaps API methods MVGoogleTileLayer or MVNokiaTileLayer etc. then set the srid to 3857 using their setSrid() method, e.g. myTileLayer.setSrid(3857);
The second (and not preferred) option is to add transformation rules that assume a sphere, instead of an ellipsoid, when transforming from the source srid to 3785. So, for example, when transforming from 4326 (WGS84) to 3785 assume that the ellipsoid (WGS 84) is just a sphere. That is not really the case, however, as shown by the query below.
SQL> select srid, datum_name, ellipsoid_name, semi_major_axis, semi_minor_axis from
2 sdo_coord_ref_sys c, sdo_datums d, sdo_ellipsoids e where
3 c.srid in (4326, 3785) and
4 (c.datum_id=d.datum_id or c.geog_crs_datum_id=d.datum_id) and
5 d.ellipsoid_id = e.ellipsoid_id ;
SRID DATUM_NAME ELLIPSOID_NAME
---------- -------------------------------- -----------------------------
SEMI_MAJOR_AXIS SEMI_MINOR_AXIS
--------------- ---------------
3785 Popular Visualisation Datum Popular Visualisation Sphere
6378137
4326 World Geodetic System 1984 WGS 84
6378137 6356752.31
SQL>
So the transformation rule says ignore that WGS84 is an ellipse and assume it's a sphere of radius 6378137 meters.
The rule is specified by the following SQL statement (which must be executed by a SYS or similarly privileged user.
-- For 4326, EPSG equivalent of 8307
call sdo_cs.create_pref_concatenated_op( 43263785, 'CONCATENATED_OPERATION_4326_3785', TFM_PLAN(SDO_TFM_CHAIN(4326, 1000000000, 4055, 19847, 3785)), NULL);
which says use the null operation (coord op id 1000000000) when transforming from the geodetic cs 4326 to the geodetic cs 4055, and thereby assume they are spheres of the same radius, and then use the spherical Mercator projection (coord op id 19847) to go to 3785.
SQL> select coord_op_name, coord_op_id from sdo_coord_ops where
2 coord_op_id in (1000000000, 19847) ;
COORD_OP_NAME COORD_OP_ID
--------------------------------- -----------
Popular Visualisation Mercator 19847
EPSG No-Op (EPSG OP 1000000000) 1000000000
Each source SRID (e.g. Texas North, or North Carolina) will need its own TFM_CHAIN to go from the projected source srid to its geodetic srid to 4055 and then to 3785 while using a No-Op when going from its datum to 4055.
How are values/entries for these tfm_chain determined? Let's look at the two mentioned above (Texas North and NC).
We can query cs_srs to find that srid for these are 2844 and 32119.
Now query the sdo_coord_ref_sys table to find the crs_datum and projection_conv_id (i.e. coord_op_id) for them.
SQL> select coord_ref_sys_name, geog_crs_datum_id, source_geog_srid, projection_
conv_id from
2 sdo_coord_ref_sys where srid in (2844, 32119) ;
COORD_REF_SYS_NAME GEOG_CRS_DATUM_ID SOURCE_GEOG_SRID
------------------------------ ----------------- ----------------
PROJECTION_CONV_ID
------------------
NAD83(HARN) / Texas North 6152 4152
14231
NAD83 / North Carolina 6269 4269
13230
SQL>
Next query the datums and ellipsoids tables to check the semi-major axis radius for them.
SQL> select datum_name, ellipsoid_name, semi_major_axis from
2 sdo_datums d, sdo_ellipsoids e where d.datum_id in (6269, 6152) and
3 d.ellipsoid_id=e.ellipsoid_id;
DATUM_NAME ELLIPSOID_NAME
-------------------------------- --------------------------------
SEMI_MAJOR_AXIS
---------------
NAD83 (High Accuracy Regional Ne GRS 1980
twork)
6378137
North American Datum 1983 GRS 1980
6378137
They both use GRS 1980 with a semi-major radius of 6378137 which is the radius for the spheroid for 4055 too so a No-Op can be used. So the tfm chain becomes
2844, -14231, 4152, 1000000000, 4055, 19847, 3785 for Texas North and
32119, -13230, 4269, 1000000000, 4055, 19847, 3785 for North Carolina.
The negative values of PROJECTION_CONV_ID are used since they are the inverse of the projection. That is, projection_conv_id is the operation to go from 4152 to 2844 or from 4269 to 32119.
SQL> select coord_op_name, coord_op_id from sdo_coord_ops where
2 coord_op_id in (14231, 13230) ;
COORD_OP_NAME
-------------------------------------------------------------------------
COORD_OP_ID
-----------
SPCS83 North Carolina zone (meters) (EPSG OP 13230)
13230
SPCS83 Texas North zone (meters) (EPSG OP 14231)
14231
When a preferred tranformation rule, or operation, is defined it is added to the
sdo_preferred_op_system table.
SQL> desc sdo_preferred_ops_system
Name Null? Type
----------------------------------------- -------- ----------------------------
SOURCE_SRID NOT NULL NUMBER(10)
COORD_OP_ID NOT NULL NUMBER(10)
TARGET_SRID NOT NULL NUMBER(10)
Now let's look at the coordinate conversions without any preferred (or custom) transformation rules.
SQL> select count(1) from sdo_preferred_ops_system ;
COUNT(1)
----------
0
SQL> select city,
2 sdo_cs.transform(location, 3857) loc_3857,
3 sdo_cs.transform(sdo_cs.transform(location, 2844), 3857) loc_2844_3857,
4 sdo_cs.transform(sdo_cs.transform(location, 2844), 3785) loc_2844_3785
5 from cities where state_abrv='TX' and city='Amarillo' ;
CITY
------------------------------------------
LOC_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
LOC_2844_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
LOC_2844_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
Amarillo
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-11334404, 4166799.81, NULL), NULL, NULL)
The first two (using srid 3857) match up while the conversion to 3785 gives a different result which is slightly offset in Y.
Ditto for Raleigh, NC
SQL> select city,
2 sdo_cs.transform(location, 3857) loc_3857,
3 sdo_cs.transform(sdo_cs.transform(location, 32119), 3857) loc_32119_3857,
4 sdo_cs.transform(sdo_cs.transform(location, 32119), 3785) loc_32119_3785
5 from cities where state_abrv='NC' and city='Raleigh' ;
CITY
------------------------------------------
LOC_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
LOC_2844_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
LOC_2844_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
Raleigh
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-8756252.3, 4251131.29, NULL), NULL, NULL)
Now let's add the tfm rules.
SQL> conn system@sdolnx2
Enter password:
Connected.
SQL> CALL sdo_cs.create_pref_concatenated_op(
2 28443785,
3 'CONCATENATED OPERATION',
4 TFM_PLAN(SDO_TFM_CHAIN(2844, -14231, 4152, 1000000000, 4055, 19847, 3785)
), NULL);
Call completed.
-- Give a different id and name to the next concatenated op
SQL> CALL sdo_cs.create_pref_concatenated_op(
2 321193785,
3 'CONCATENATED OPERATION 32119 3785',
4 TFM_PLAN(SDO_TFM_CHAIN(32119, -13230, 4269, 1000000000, 4055, 19847, 3785)), NULL);
Call completed.
Check that these were added
SQL> conn mvdemo@sdolnx2
Enter password:
Connected.
SQL> select * from sdo_preferred_ops_system;
SOURCE_SRID COORD_OP_ID TARGET_SRID
----------- ----------- -----------
2844 28443785 3785
3785 -28443785 2844
32119 321193785 3785
3785 -321193785 32119
Now try the above transform queries again and note that all three are the same.
SQL> select city,
2 sdo_cs.transform(location, 3857) loc_3857,
3 sdo_cs.transform(sdo_cs.transform(location, 2844), 3857) loc_2844_3857,
4 sdo_cs.transform(sdo_cs.transform(location, 2844), 3785) loc_2844_3785
5 from cities where state_abrv='TX' and city='Amarillo' ;
CITY
------------------------------------------
LOC_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
LOC_2844_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
LOC_2844_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
Amarillo
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SQL> select city,
2 sdo_cs.transform(location, 3857) loc_3857,
3 sdo_cs.transform(sdo_cs.transform(location, 32119), 3857) loc_32119_3857,
4 sdo_cs.transform(sdo_cs.transform(location, 32119), 3785) loc_32119_3785
5 from cities where state_abrv='NC' and city='Raleigh' ;
CITY
------------------------------------------
LOC_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
LOC_32119_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDIN
--------------------------------------------------------------------------------
LOC_32119_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDIN
--------------------------------------------------------------------------------
Raleigh
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
Lastly if the ellipsoid for the source projected system does not have the same semi-major axis value
(e.g for srid 27700, British National Grid) then the chain should be source to 4326 and then to 3785.
For BNG (srid 27700) the ellipsoid is Airy 1830 and the semi-major axis is 6377563.4.
SQL> select e.ellipsoid_name, e.semi_major_axis from sdo_ellipsoids e,
2 sdo_datums d, sdo_coord_ref_sys c where
3 c.srid=27700 and
4 c.geog_crs_datum_id = d.datum_id and
5 d.ellipsoid_id = e.ellipsoid_id ;
ELLIPSOID_NAME SEMI_MAJOR_AXIS
---------------------------------------- ---------------
Airy 1830 6377563.4
Add the rule for 4326 to 3785 and then test the direct to 3785 and via 4326 route transforms.
call sdo_cs.create_pref_concatenated_op(43263785, 'CONCATENATED_OPERATION_4326', TFM_PLAN(SDO_TFM_CHAIN(4326, 1000000000, 4055, 19847, 3785)), NULL);
First without adding a 27700 to 3785 tfm rule that does not go through 4326
SQL> select name, sdo_cs.transform(geometry, 27700) geom_bng,
2 sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3785) geom_bng_3785,
3 sdo_cs.transform(sdo_cs.transform(sdo_cs.transform(geometry, 27700),4326),3
785) geom_bng_4326_3785
4 from cities where iso_a2='UK' and name='London';
NAME
------------------------------
GEOM_BNG(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
GEOM_BNG_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
GEOM_BNG_4326_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_O
--------------------------------------------------------------------------------
London
SDO_GEOMETRY(3001, 27700, SDO_POINT_TYPE(530678.086, 179789.242, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6677081.27, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
Next add one for 27700 which is likely incorrect
call sdo_cs.create_pref_concatenated_op(277003785, 'CONCATENATED_OPERATION_27700', TFM_PLAN(SDO_TFM_CHAIN(27700, -19916, 4277, 1000000000, 4055, 19847, 3785)), NULL);
select name, sdo_cs.transform(geometry, 27700) geom_bng,
sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3785) geom_bng_3785,
sdo_cs.transform(sdo_cs.transform(sdo_cs.transform(geometry, 27700),4326),3785) geom_bng_4326_3785,
sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3857) geom_bng_3857
from cities where iso_a2='UK' and name='London';
NAME
------------------------------
GEOM_BNG(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
GEOM_BNG_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
GEOM_BNG_4326_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_O
--------------------------------------------------------------------------------
GEOM_BNG_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
London
SDO_GEOMETRY(3001, 27700, SDO_POINT_TYPE(530678.086, 179789.242, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13031.112, 6710474.7, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3857, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
The 3rd and 4th agree. The second (which is 27700 -> 3785 with the rule) disagrees with both
the 27700 -> 3857 and the 27700 -> 3785 without a rule.
Without a rule it is:
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6677081.27, 0), NULL, NULL)
With a rule that does not iclude 4326 in the chain it is:
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13031.112, 6710474.7, 0), NULL, NULL)
Now modify the rule to correct the chain to include 4326
SQL> call sdo_cs.delete_op(277003785);
Call completed.
SQL> select coord_op_id, coord_op_name, target_srid from sdo_coord_ops where source_srid=4277 ;
COORD_OP_ID COORD_OP_NAME TARGET_SRID
----------- -------------------------------------------------- -----------
1195 OSGB 1936 to WGS 84 (1) (EPSG OP 1195) 4326
1196 OSGB 1936 to WGS 84 (2) (EPSG OP 1196) 4326
1197 OSGB 1936 to WGS 84 (3) (EPSG OP 1197) 4326
1198 OSGB 1936 to WGS 84 (4) (EPSG OP 1198) 4326
1199 OSGB 1936 to WGS 84 (5) (EPSG OP 1199) 4326
1314 OSGB 1936 to WGS 84 (Petroleum) (EPSG OP 1314) 4326
1315 OSGB 1936 to ED50 (UKOOA) (EPSG OP 1315) 4230
7 rows selected.
We'll use coord_op_id 1195
call sdo_cs.create_pref_concatenated_op(
277003785, 'CONCATENATED_OPERATION_27700', TFM_PLAN(
SDO_TFM_CHAIN(27700, -19916, 4277, 1195, 4326, 1000000000, 4055, 19847, 3785)), NULL);
Redo the query for London to see the if the direct, via 4326, and to 3857 all agree.
select name, sdo_cs.transform(geometry, 27700) geom_bng,
sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3785) geom_bng_3785,
sdo_cs.transform(sdo_cs.transform(sdo_cs.transform(geometry, 27700),4326),3785) geom_bng_4326_3785,
sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3857) geom_bng_3857
from cities where iso_a2='UK' and name='London';
NAME
------------------------------
GEOM_BNG(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
GEOM_BNG_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
GEOM_BNG_4326_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_O
--------------------------------------------------------------------------------
GEOM_BNG_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
London
SDO_GEOMETRY(3001, 27700, SDO_POINT_TYPE(530678.086, 179789.242, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6677081.27, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3857, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
This time they do.
Further details can be found in the Spatial and MapViewer documentation that is in
http://docs.oracle.com/cd/E16655_01/appdev.121/e17896/sdo_cs_concepts.htm#CIHJFBFG (Spatial), and
http://docs.oracle.com/cd/E28280_01/web.1111/e10145/vis_omaps.htm#BACDBCBI (MapViewer).
There are two options for using Web Mercator with MapViewer.
The first (and preferred option) is to use database version 11.2.0.3 (or later) and MapViewer 11.1.1.6 (or later) and use the ESPG:3857 srid instead. In order to do this the tile layer config definitions for the Google/Bing/OSM/Nokia etc. tile layers must be updated to change the SRID from 3785 to 3857.
If a database entry in user_sdo_cached_maps is used to specify the tile layer (and its config) then just update the stored definition in that view. For example, if the entry is
SQL> select name, definition from user_sdo_cached_maps where name='NOKIA_MAP';
NAME
--------------------------------
DEFINITION
--------------------------------------------------------------------------------
NOKIA_MAP
<map_tile_layer name="nokia_map">
<external_map_source url="" builtin_tile_layer="nokia">
<properties>
<property name="lib_url" value="http://api.maps.nokia.com/2.2.0/jsl.js"/>
<property name="key" value="your_api_key"/>
<property name="appId" value="your_appId"/>
<property name="map_type_values"
value="MVNokiaTileLayer.TYPE_NORMAL;MVNokiaTileLayer.TYPE_SATELLITE;MVNokiaTileLayer.TYPE_TERRAIN"/>
<property name="map_type_names" value="Normal;Satellite;Terrain"/>
<property name="default_map_type" value="MVNokiaTileLayer.TYPE_NORMAL"/>
</properties>
</external_map_source>
<coordinate_system srid="3785" minX="-2.0037508E7" minY="-2.0037508E7" maxX="2.0037508E7" maxY="2.0037508E7"/>
<tile_image width="256" height="256"/>
<zoom_levels levels="19" min_scale="0.0" max_scale="0.0" min_tile_width="76.43702697753906" min_tile_height="2.0037508E7">
<zoom_level level="0" name="" description="" scale="0.0" tile_width="2.0037508E7" tile_height="2.0037508E7"/>
<zoom_level level="1" name="" description="" scale="0.0" tile_width="1.0018754E7" tile_height="1.0018754E7"/>
<zoom_level level="2" name="" description="" scale="0.0" tile_width="5009377.0" tile_height="5009377.0"/>
<zoom_level level="3" name="" description="" scale="0.0" tile_width="2504688.5" tile_height="2504688.5"/>
<zoom_level level="4" name="" description="" scale="0.0" tile_width="1252344.25" tile_height="1252344.25"/>
<zoom_level level="5" name="" description="" scale="0.0" tile_width="626172.125" tile_height="626172.125"/>
<zoom_level level="6" name="" description="" scale="0.0" tile_width="313086.0625" tile_height="313086.0625"/>
<zoom_level level="7" name="" description="" scale="0.0" tile_width="156543.03125" tile_height="156543.03125"/>
<zoom_level level="8" name="" description="" scale="0.0" tile_width="78271.515625" tile_height="78271.515625"/>
<zoom_level level="9" name="" description="" scale="0.0" tile_width="39135.7578125" tile_height="39135.7578125"/>
<zoom_level level="10" name="" description="" scale="0.0" tile_width="19567.87890625" tile_height="19567.87890625"/>
<zoom_level level="11" name="" description="" scale="0.0" tile_width="9783.939453125" tile_height="9783.939453125"/>
<zoom_level level="12" name="" description="" scale="0.0" tile_width="4891.9697265625" tile_height="4891.9697265625"/>
<zoom_level level="13" name="" description="" scale="0.0" tile_width="2445.98486328125" tile_height="2445.98486328125"/>
<zoom_level level="14" name="" description="" scale="0.0" tile_width="1222.992431640625" tile_height="1222.992431640625"/>
<zoom_level level="15" name="" description="" scale="0.0" tile_width="611.4962158203125" tile_height="611.4962158203125"/>
<zoom_level level="16" name="" description="" scale="0.0" tile_width="305.74810791015625" tile_height="305.74810791015625"/>
<zoom_level level="17" name="" description="" scale="0.0" tile_width="152.87405395507812" tile_height="152.87405395507812"/>
<zoom_level level="18" name="" description="" scale="0.0" tile_width="76.43702697753906" tile_height="76.43702697753906"/>
</zoom_levels>
</map_tile_layer>
where the srid="3785" then update it using a SQL statement like
update user_sdo_cached_maps set definition = replace(definition, 'srid="3785"', 'srid="3857"')
where name='NOKIA_MAP';
If however the usage is via the OracleMaps API methods MVGoogleTileLayer or MVNokiaTileLayer etc. then set the srid to 3857 using their setSrid() method, e.g. myTileLayer.setSrid(3857);
The second (and not preferred) option is to add transformation rules that assume a sphere, instead of an ellipsoid, when transforming from the source srid to 3785. So, for example, when transforming from 4326 (WGS84) to 3785 assume that the ellipsoid (WGS 84) is just a sphere. That is not really the case, however, as shown by the query below.
SQL> select srid, datum_name, ellipsoid_name, semi_major_axis, semi_minor_axis from
2 sdo_coord_ref_sys c, sdo_datums d, sdo_ellipsoids e where
3 c.srid in (4326, 3785) and
4 (c.datum_id=d.datum_id or c.geog_crs_datum_id=d.datum_id) and
5 d.ellipsoid_id = e.ellipsoid_id ;
SRID DATUM_NAME ELLIPSOID_NAME
---------- -------------------------------- -----------------------------
SEMI_MAJOR_AXIS SEMI_MINOR_AXIS
--------------- ---------------
3785 Popular Visualisation Datum Popular Visualisation Sphere
6378137
4326 World Geodetic System 1984 WGS 84
6378137 6356752.31
SQL>
So the transformation rule says ignore that WGS84 is an ellipse and assume it's a sphere of radius 6378137 meters.
The rule is specified by the following SQL statement (which must be executed by a SYS or similarly privileged user.
-- For 4326, EPSG equivalent of 8307
call sdo_cs.create_pref_concatenated_op( 43263785, 'CONCATENATED_OPERATION_4326_3785', TFM_PLAN(SDO_TFM_CHAIN(4326, 1000000000, 4055, 19847, 3785)), NULL);
which says use the null operation (coord op id 1000000000) when transforming from the geodetic cs 4326 to the geodetic cs 4055, and thereby assume they are spheres of the same radius, and then use the spherical Mercator projection (coord op id 19847) to go to 3785.
SQL> select coord_op_name, coord_op_id from sdo_coord_ops where
2 coord_op_id in (1000000000, 19847) ;
COORD_OP_NAME COORD_OP_ID
--------------------------------- -----------
Popular Visualisation Mercator 19847
EPSG No-Op (EPSG OP 1000000000) 1000000000
Each source SRID (e.g. Texas North, or North Carolina) will need its own TFM_CHAIN to go from the projected source srid to its geodetic srid to 4055 and then to 3785 while using a No-Op when going from its datum to 4055.
How are values/entries for these tfm_chain determined? Let's look at the two mentioned above (Texas North and NC).
We can query cs_srs to find that srid for these are 2844 and 32119.
Now query the sdo_coord_ref_sys table to find the crs_datum and projection_conv_id (i.e. coord_op_id) for them.
SQL> select coord_ref_sys_name, geog_crs_datum_id, source_geog_srid, projection_
conv_id from
2 sdo_coord_ref_sys where srid in (2844, 32119) ;
COORD_REF_SYS_NAME GEOG_CRS_DATUM_ID SOURCE_GEOG_SRID
------------------------------ ----------------- ----------------
PROJECTION_CONV_ID
------------------
NAD83(HARN) / Texas North 6152 4152
14231
NAD83 / North Carolina 6269 4269
13230
SQL>
Next query the datums and ellipsoids tables to check the semi-major axis radius for them.
SQL> select datum_name, ellipsoid_name, semi_major_axis from
2 sdo_datums d, sdo_ellipsoids e where d.datum_id in (6269, 6152) and
3 d.ellipsoid_id=e.ellipsoid_id;
DATUM_NAME ELLIPSOID_NAME
-------------------------------- --------------------------------
SEMI_MAJOR_AXIS
---------------
NAD83 (High Accuracy Regional Ne GRS 1980
twork)
6378137
North American Datum 1983 GRS 1980
6378137
They both use GRS 1980 with a semi-major radius of 6378137 which is the radius for the spheroid for 4055 too so a No-Op can be used. So the tfm chain becomes
2844, -14231, 4152, 1000000000, 4055, 19847, 3785 for Texas North and
32119, -13230, 4269, 1000000000, 4055, 19847, 3785 for North Carolina.
The negative values of PROJECTION_CONV_ID are used since they are the inverse of the projection. That is, projection_conv_id is the operation to go from 4152 to 2844 or from 4269 to 32119.
SQL> select coord_op_name, coord_op_id from sdo_coord_ops where
2 coord_op_id in (14231, 13230) ;
COORD_OP_NAME
-------------------------------------------------------------------------
COORD_OP_ID
-----------
SPCS83 North Carolina zone (meters) (EPSG OP 13230)
13230
SPCS83 Texas North zone (meters) (EPSG OP 14231)
14231
When a preferred tranformation rule, or operation, is defined it is added to the
sdo_preferred_op_system table.
SQL> desc sdo_preferred_ops_system
Name Null? Type
----------------------------------------- -------- ----------------------------
SOURCE_SRID NOT NULL NUMBER(10)
COORD_OP_ID NOT NULL NUMBER(10)
TARGET_SRID NOT NULL NUMBER(10)
Now let's look at the coordinate conversions without any preferred (or custom) transformation rules.
SQL> select count(1) from sdo_preferred_ops_system ;
COUNT(1)
----------
0
SQL> select city,
2 sdo_cs.transform(location, 3857) loc_3857,
3 sdo_cs.transform(sdo_cs.transform(location, 2844), 3857) loc_2844_3857,
4 sdo_cs.transform(sdo_cs.transform(location, 2844), 3785) loc_2844_3785
5 from cities where state_abrv='TX' and city='Amarillo' ;
CITY
------------------------------------------
LOC_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
LOC_2844_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
LOC_2844_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
Amarillo
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-11334404, 4166799.81, NULL), NULL, NULL)
The first two (using srid 3857) match up while the conversion to 3785 gives a different result which is slightly offset in Y.
Ditto for Raleigh, NC
SQL> select city,
2 sdo_cs.transform(location, 3857) loc_3857,
3 sdo_cs.transform(sdo_cs.transform(location, 32119), 3857) loc_32119_3857,
4 sdo_cs.transform(sdo_cs.transform(location, 32119), 3785) loc_32119_3785
5 from cities where state_abrv='NC' and city='Raleigh' ;
CITY
------------------------------------------
LOC_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
LOC_2844_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
LOC_2844_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
Raleigh
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-8756252.3, 4251131.29, NULL), NULL, NULL)
Now let's add the tfm rules.
SQL> conn system@sdolnx2
Enter password:
Connected.
SQL> CALL sdo_cs.create_pref_concatenated_op(
2 28443785,
3 'CONCATENATED OPERATION',
4 TFM_PLAN(SDO_TFM_CHAIN(2844, -14231, 4152, 1000000000, 4055, 19847, 3785)
), NULL);
Call completed.
-- Give a different id and name to the next concatenated op
SQL> CALL sdo_cs.create_pref_concatenated_op(
2 321193785,
3 'CONCATENATED OPERATION 32119 3785',
4 TFM_PLAN(SDO_TFM_CHAIN(32119, -13230, 4269, 1000000000, 4055, 19847, 3785)), NULL);
Call completed.
Check that these were added
SQL> conn mvdemo@sdolnx2
Enter password:
Connected.
SQL> select * from sdo_preferred_ops_system;
SOURCE_SRID COORD_OP_ID TARGET_SRID
----------- ----------- -----------
2844 28443785 3785
3785 -28443785 2844
32119 321193785 3785
3785 -321193785 32119
Now try the above transform queries again and note that all three are the same.
SQL> select city,
2 sdo_cs.transform(location, 3857) loc_3857,
3 sdo_cs.transform(sdo_cs.transform(location, 2844), 3857) loc_2844_3857,
4 sdo_cs.transform(sdo_cs.transform(location, 2844), 3785) loc_2844_3785
5 from cities where state_abrv='TX' and city='Amarillo' ;
CITY
------------------------------------------
LOC_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
LOC_2844_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
LOC_2844_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
Amarillo
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-11334404, 4191441.06, NULL), NULL, NULL)
SQL> select city,
2 sdo_cs.transform(location, 3857) loc_3857,
3 sdo_cs.transform(sdo_cs.transform(location, 32119), 3857) loc_32119_3857,
4 sdo_cs.transform(sdo_cs.transform(location, 32119), 3785) loc_32119_3785
5 from cities where state_abrv='NC' and city='Raleigh' ;
CITY
------------------------------------------
LOC_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
LOC_32119_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDIN
--------------------------------------------------------------------------------
LOC_32119_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDIN
--------------------------------------------------------------------------------
Raleigh
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-8756252.3, 4276149.54, NULL), NULL, NULL)
Lastly if the ellipsoid for the source projected system does not have the same semi-major axis value
(e.g for srid 27700, British National Grid) then the chain should be source to 4326 and then to 3785.
For BNG (srid 27700) the ellipsoid is Airy 1830 and the semi-major axis is 6377563.4.
SQL> select e.ellipsoid_name, e.semi_major_axis from sdo_ellipsoids e,
2 sdo_datums d, sdo_coord_ref_sys c where
3 c.srid=27700 and
4 c.geog_crs_datum_id = d.datum_id and
5 d.ellipsoid_id = e.ellipsoid_id ;
ELLIPSOID_NAME SEMI_MAJOR_AXIS
---------------------------------------- ---------------
Airy 1830 6377563.4
Add the rule for 4326 to 3785 and then test the direct to 3785 and via 4326 route transforms.
call sdo_cs.create_pref_concatenated_op(43263785, 'CONCATENATED_OPERATION_4326', TFM_PLAN(SDO_TFM_CHAIN(4326, 1000000000, 4055, 19847, 3785)), NULL);
First without adding a 27700 to 3785 tfm rule that does not go through 4326
SQL> select name, sdo_cs.transform(geometry, 27700) geom_bng,
2 sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3785) geom_bng_3785,
3 sdo_cs.transform(sdo_cs.transform(sdo_cs.transform(geometry, 27700),4326),3
785) geom_bng_4326_3785
4 from cities where iso_a2='UK' and name='London';
NAME
------------------------------
GEOM_BNG(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
GEOM_BNG_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
GEOM_BNG_4326_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_O
--------------------------------------------------------------------------------
London
SDO_GEOMETRY(3001, 27700, SDO_POINT_TYPE(530678.086, 179789.242, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6677081.27, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
Next add one for 27700 which is likely incorrect
call sdo_cs.create_pref_concatenated_op(277003785, 'CONCATENATED_OPERATION_27700', TFM_PLAN(SDO_TFM_CHAIN(27700, -19916, 4277, 1000000000, 4055, 19847, 3785)), NULL);
select name, sdo_cs.transform(geometry, 27700) geom_bng,
sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3785) geom_bng_3785,
sdo_cs.transform(sdo_cs.transform(sdo_cs.transform(geometry, 27700),4326),3785) geom_bng_4326_3785,
sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3857) geom_bng_3857
from cities where iso_a2='UK' and name='London';
NAME
------------------------------
GEOM_BNG(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
GEOM_BNG_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
GEOM_BNG_4326_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_O
--------------------------------------------------------------------------------
GEOM_BNG_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
London
SDO_GEOMETRY(3001, 27700, SDO_POINT_TYPE(530678.086, 179789.242, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13031.112, 6710474.7, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3857, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
The 3rd and 4th agree. The second (which is 27700 -> 3785 with the rule) disagrees with both
the 27700 -> 3857 and the 27700 -> 3785 without a rule.
Without a rule it is:
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6677081.27, 0), NULL, NULL)
With a rule that does not iclude 4326 in the chain it is:
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13031.112, 6710474.7, 0), NULL, NULL)
Now modify the rule to correct the chain to include 4326
SQL> call sdo_cs.delete_op(277003785);
Call completed.
SQL> select coord_op_id, coord_op_name, target_srid from sdo_coord_ops where source_srid=4277 ;
COORD_OP_ID COORD_OP_NAME TARGET_SRID
----------- -------------------------------------------------- -----------
1195 OSGB 1936 to WGS 84 (1) (EPSG OP 1195) 4326
1196 OSGB 1936 to WGS 84 (2) (EPSG OP 1196) 4326
1197 OSGB 1936 to WGS 84 (3) (EPSG OP 1197) 4326
1198 OSGB 1936 to WGS 84 (4) (EPSG OP 1198) 4326
1199 OSGB 1936 to WGS 84 (5) (EPSG OP 1199) 4326
1314 OSGB 1936 to WGS 84 (Petroleum) (EPSG OP 1314) 4326
1315 OSGB 1936 to ED50 (UKOOA) (EPSG OP 1315) 4230
7 rows selected.
We'll use coord_op_id 1195
call sdo_cs.create_pref_concatenated_op(
277003785, 'CONCATENATED_OPERATION_27700', TFM_PLAN(
SDO_TFM_CHAIN(27700, -19916, 4277, 1195, 4326, 1000000000, 4055, 19847, 3785)), NULL);
Redo the query for London to see the if the direct, via 4326, and to 3857 all agree.
select name, sdo_cs.transform(geometry, 27700) geom_bng,
sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3785) geom_bng_3785,
sdo_cs.transform(sdo_cs.transform(sdo_cs.transform(geometry, 27700),4326),3785) geom_bng_4326_3785,
sdo_cs.transform(sdo_cs.transform(geometry, 27700), 3857) geom_bng_3857
from cities where iso_a2='UK' and name='London';
NAME
------------------------------
GEOM_BNG(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
--------------------------------------------------------------------------------
GEOM_BNG_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
GEOM_BNG_4326_3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_O
--------------------------------------------------------------------------------
GEOM_BNG_3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINA
--------------------------------------------------------------------------------
London
SDO_GEOMETRY(3001, 27700, SDO_POINT_TYPE(530678.086, 179789.242, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6677081.27, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3785, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
SDO_GEOMETRY(3001, 3857, SDO_POINT_TYPE(-13210.033, 6710566.11, 0), NULL, NULL)
This time they do.