Oracle Spatial - Coordinate System

1 - About

The SDO_SRID attribute identify the associated coordinate System with the geometry. Its value can be null or one of the SDO_COORD_REF_SYS table.

SRID Name Type Description
8307 Longitude / Latitude (WGS 84) GEOGRAPHIC2D
90112 Netherlands National System PROJECTED onto a plane
28992 Amersfoort / RD New PROJECTED

3 - MetaData

The coordinate systems functions and procedures use information provided in the tables and views supplied with Oracle Spatial. The tables and views are part of the MDSYS schema; however, public synonyms are defined, so you do not need to specify MDSYS. before the table or view name.

All tables are explained in this paragraph from the user guide.

4 - Coordinate System Transformation

This section presents a simplified example that uses coordinate system transformation functions and procedures.

4.1 - Polygon

-- Return the transformation of cola_c using to_srid 8199 
-- ('Longitude / Latitude (Arc 1950)')
SELECT c.name, SDO_CS.TRANSFORM(c.shape, m.diminfo, 8199) 
  FROM cola_markets_cs c, user_sdo_geom_metadata m 
  WHERE m.table_name = 'COLA_MARKETS_CS' AND m.column_name = 'SHAPE' 
  AND c.name = 'cola_c';
 
-- Transform the geometry to the coordinate system 90112
-- and create a table to store the new geometries
CREATE TABLE europa_landen_90112 AS
SELECT C.Code,
  C.Name,
  C.COUNTRY_UK,
  Sdo_Cs.Transform(C.Geometry, M.Diminfo, 90112) geometry
FROM europa_landen c,
  USER_SDO_GEOM_METADATA M
WHERE M.TABLE_NAME = 'EUROPA_LANDEN'
AND M.COLUMN_NAME  = 'GEOMETRY';

Don't forget to create the metadata before using this new layer

INSERT
INTO User_Sdo_Geom_Metadata VALUES
  (
    'EUROPA_LANDEN_90112',
    'GEOMETRY',
    MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('Longitude', -180, 180, .005), MDSYS.SDO_DIM_ELEMENT('Latitude', -90, 90, .005)),
    90112
  );
CREATE INDEX EUROPA_LANDEN_90112_sdx ON EUROPA_LANDEN_90112
  (
    GEOMETRY
  )
  INDEXTYPE IS MDSYS.SPATIAL_INDEX;

4.2 - Point

5 - EPSG TO

5.1 - EPSG to SRID

SELECT SDO_CS.MAP_EPSG_SRID_TO_ORACLE(28992) FROM DUAL;
SELECT SDO_CS.MAP_ORACLE_SRID_TO_EPSG(28992) FROM dual;
--Gets the version number of the EPSG dataset used by Oracle Spatial.
SELECT SDO_CS.GET_EPSG_DATA_VERSION FROM DUAL;
  • Bookmark "Oracle Spatial - Coordinate System" at del.icio.us
  • Bookmark "Oracle Spatial - Coordinate System" at Digg
  • Bookmark "Oracle Spatial - Coordinate System" at Ask
  • Bookmark "Oracle Spatial - Coordinate System" at Google
  • Bookmark "Oracle Spatial - Coordinate System" at StumbleUpon
  • Bookmark "Oracle Spatial - Coordinate System" at Technorati
  • Bookmark "Oracle Spatial - Coordinate System" at Live Bookmarks
  • Bookmark "Oracle Spatial - Coordinate System" at Yahoo! Myweb
  • Bookmark "Oracle Spatial - Coordinate System" at Facebook
  • Bookmark "Oracle Spatial - Coordinate System" at Yahoo! Bookmarks
  • Bookmark "Oracle Spatial - Coordinate System" at Twitter
  • Bookmark "Oracle Spatial - Coordinate System" at myAOL
oracle_spatial/coordinate_system.txt ยท Last modified: 2017/06/23 14:45 by gerardnico