Oracle Spatial Databases
      Integrating CAD and GIS
                using
         Oracle technologies
Mark Millman – Mizar, LLC
   30+ years of CAD/GIS experience
    –   Wide range of natural resource; local, state, and
        national government; electric, gas, water, & telco; and
        core systems experience.
    –   Former V.P.Geoengineering Technologies Bentley
        Systems
    –   Originator of MicroStation Geographics
   25+ years of Oracle RDBMS experience
   5 years focus on spatially enabled enterprise
    databases and middle-tier implementations.
WHAT IS CAD/GIS ?

Purposed systems for land use professionals
CAD & GIS ?
   CAD & GIS are purposed applications
    –   Developed for and by land use professionals
    –   Highly specialized and functional
    –   Departmental system
   Functionality predominates
   Twenty years ago was bigger than RDBMS
    –   Today is a fraction
   Half of all information is location based
    –   But that does not imply GIS
   CAD / GIS is a content provider
   Not all CAD / GIS content is enterprise relevant
WHAT IS SPATIAL DATABASE?

Enterprise resource
Spatial Database ?
   Just another data type in a universal enterprise
    information system.
   Reliability, security, scalability, and control are
    key to enterprise frameworks:
    –   Functionality is secondary.
   Provides a common format for various GIS
    content:
    –   Ensures application independence;
    –   Modeled on open standards;
    –   All information is accessible.
   Exposes location to the enterprise
ORACLE SPATIAL

Part of a universal information repository
Oracle Spatial
Universal Server
   Structured scalar data
    –   Text, numbers, dates, etc.
   Documents
    –   140 default document types
    –   CAD / GI S files
    –   Indexed contents using Oracle Text
   Media
     – Image, audio, and video

   Spatial
Spatial
   Location
   Geocoder
   GeoRaster
   Network
   3D Geometry
   TIN
   Point Cloud
   Routing
The in and out of it
   FME
   Shape file import (Oracle)
   Shape file export (GeoTools)
   Shared Repository
    –   Geomedia
    –   MapInfo
    –   ArcServer / ArcSDE
Shared repository
   Application specific data types, very typical
    of advanced CAD applications pose special
    problems for any share enterprise
    resource.
   Obfuscated information poses a barrier
    and requires customization:
    –   Annotation is the primary example
    –   Oriented Points
Oriented Points
   An extension of the standard POINT
    geometry
   Used for text and symbol orientation
   Stores two coordinates
    –   Absolute location of origin
    –   A direction vector
   Protocols for LRS, N-Dimensional, and
    Multi-Point geometries.
Interpreting Geomedia orientation
Create or replace FUNCTION ORIENT_POINT (                                           create or replace PROCEDURE ORIENT_LAYER AS
INGEOM MDSYS.SDO_GEOMETRY,                                                          BEGIN
ROTATION NUMBER
) RETURN MDSYS.SDO_GEOMETRY AS
                                                                                    -- sample process for creating oriented points
OUTGEOM MDSYS.SDO_GEOMETRY;                                                         -- the ORIENT_POINT procedure will drop the Geomedia data so
ORDS SDO_ORDINATE_ARRAY;                                                            -- the original geometry should be saved if that info is important.
EINFO MDSYS.SDO_ELEM_INFO_ARRAY;
ETYPE NUMBER;                                                                       -- The update is in a loop because there are 1.3 million record in
XR NUMBER;                                                                                dimensions and I was timing out.
YR NUMBER;
PI NUMBER := 3.141569;                                                                FOR AROW IN (SELECT ID1, GEOM, ANGLE FROM DIMENSIONS) LOOP
IDX NUMBER := 1;
                                                                                        UPDATE DIMENSIONS SET R_GEOM = ORIENT_POINT(AROW.GEOM,
BEGIN
                                                                                          AROW.ANGLE)
                                                                                          WHERE ID1 = AROW.ID1;
-- Spatial Users Guide sect 2.7.6 Oriented Points
-- This is limited to 2D points but 3d and 4d are supported.                            COMMIT;
-- All point data must be stored in the ordinate array, not the sdo_point.            END LOOP;
IF INGEOM IS NULL OR INGEOM.SDO_GTYPE <> 2001 THEN
  RETURN INGEOM;                                                                    END ORIENT_LAYER;
END IF;

-- This is a Geomedia customization. Their proprietary format uses a type 0
        element (type 0 not supported by ESRI)
-- the element info array looks like this (1,0,6001, IDX, 1, 1) where IDX is the
        offset of the point element usually 1.
  IF INGEOM.SDO_ELEM_INFO(3) = 6001 THEN
    IDX := INGEOM.SDO_ELEM_INFO(4);
  END IF;

-- compute the point (0, .5) rotated ROTATION degrees about the origin
ORDS := INGEOM.SDO_ORDINATES;
XR := COS(PI/180*ROTATION)/2;
YR := SIN(PI/180*ROTATION)/2;

-- New geometry contains the point and the orientation vector
-- We don't maintain the Geomedia stuff, but it is in the original geometry
OUTGEOM := SDO_GEOMETRY(2001, 41100, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1, 3, 1, 0),
         SDO_ORDINATE_ARRAY(ORDS(IDX), ORDS(IDX+1), XR,YR));
RETURN OUTGEOM;
The reward
   Application independence
    –   CAD & GIS are applications.
    –   Using application storage protocols invites
        application dependence.
   Enterprise exposure
    –   Spatial has context to all systems within an
        enterprise framework,
    –   Enterprise value brings enterprise funding.
   Enterprise Reliability, Scalability, Security
Further reference
Mark Millman – Mizar, LLC

mark.millman@mizar.com

Oracle Spatial Databases

  • 1.
    Oracle Spatial Databases Integrating CAD and GIS using Oracle technologies
  • 2.
    Mark Millman –Mizar, LLC  30+ years of CAD/GIS experience – Wide range of natural resource; local, state, and national government; electric, gas, water, & telco; and core systems experience. – Former V.P.Geoengineering Technologies Bentley Systems – Originator of MicroStation Geographics  25+ years of Oracle RDBMS experience  5 years focus on spatially enabled enterprise databases and middle-tier implementations.
  • 3.
    WHAT IS CAD/GIS? Purposed systems for land use professionals
  • 4.
    CAD & GIS?  CAD & GIS are purposed applications – Developed for and by land use professionals – Highly specialized and functional – Departmental system  Functionality predominates  Twenty years ago was bigger than RDBMS – Today is a fraction  Half of all information is location based – But that does not imply GIS  CAD / GIS is a content provider  Not all CAD / GIS content is enterprise relevant
  • 5.
    WHAT IS SPATIALDATABASE? Enterprise resource
  • 6.
    Spatial Database ?  Just another data type in a universal enterprise information system.  Reliability, security, scalability, and control are key to enterprise frameworks: – Functionality is secondary.  Provides a common format for various GIS content: – Ensures application independence; – Modeled on open standards; – All information is accessible.  Exposes location to the enterprise
  • 7.
    ORACLE SPATIAL Part ofa universal information repository
  • 8.
  • 9.
    Universal Server  Structured scalar data – Text, numbers, dates, etc.  Documents – 140 default document types – CAD / GI S files – Indexed contents using Oracle Text  Media – Image, audio, and video  Spatial
  • 10.
    Spatial  Location  Geocoder  GeoRaster  Network  3D Geometry  TIN  Point Cloud  Routing
  • 11.
    The in andout of it  FME  Shape file import (Oracle)  Shape file export (GeoTools)  Shared Repository – Geomedia – MapInfo – ArcServer / ArcSDE
  • 12.
    Shared repository  Application specific data types, very typical of advanced CAD applications pose special problems for any share enterprise resource.  Obfuscated information poses a barrier and requires customization: – Annotation is the primary example – Oriented Points
  • 13.
    Oriented Points  An extension of the standard POINT geometry  Used for text and symbol orientation  Stores two coordinates – Absolute location of origin – A direction vector  Protocols for LRS, N-Dimensional, and Multi-Point geometries.
  • 14.
    Interpreting Geomedia orientation Createor replace FUNCTION ORIENT_POINT ( create or replace PROCEDURE ORIENT_LAYER AS INGEOM MDSYS.SDO_GEOMETRY, BEGIN ROTATION NUMBER ) RETURN MDSYS.SDO_GEOMETRY AS -- sample process for creating oriented points OUTGEOM MDSYS.SDO_GEOMETRY; -- the ORIENT_POINT procedure will drop the Geomedia data so ORDS SDO_ORDINATE_ARRAY; -- the original geometry should be saved if that info is important. EINFO MDSYS.SDO_ELEM_INFO_ARRAY; ETYPE NUMBER; -- The update is in a loop because there are 1.3 million record in XR NUMBER; dimensions and I was timing out. YR NUMBER; PI NUMBER := 3.141569; FOR AROW IN (SELECT ID1, GEOM, ANGLE FROM DIMENSIONS) LOOP IDX NUMBER := 1; UPDATE DIMENSIONS SET R_GEOM = ORIENT_POINT(AROW.GEOM, BEGIN AROW.ANGLE) WHERE ID1 = AROW.ID1; -- Spatial Users Guide sect 2.7.6 Oriented Points -- This is limited to 2D points but 3d and 4d are supported. COMMIT; -- All point data must be stored in the ordinate array, not the sdo_point. END LOOP; IF INGEOM IS NULL OR INGEOM.SDO_GTYPE <> 2001 THEN RETURN INGEOM; END ORIENT_LAYER; END IF; -- This is a Geomedia customization. Their proprietary format uses a type 0 element (type 0 not supported by ESRI) -- the element info array looks like this (1,0,6001, IDX, 1, 1) where IDX is the offset of the point element usually 1. IF INGEOM.SDO_ELEM_INFO(3) = 6001 THEN IDX := INGEOM.SDO_ELEM_INFO(4); END IF; -- compute the point (0, .5) rotated ROTATION degrees about the origin ORDS := INGEOM.SDO_ORDINATES; XR := COS(PI/180*ROTATION)/2; YR := SIN(PI/180*ROTATION)/2; -- New geometry contains the point and the orientation vector -- We don't maintain the Geomedia stuff, but it is in the original geometry OUTGEOM := SDO_GEOMETRY(2001, 41100, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1, 3, 1, 0), SDO_ORDINATE_ARRAY(ORDS(IDX), ORDS(IDX+1), XR,YR)); RETURN OUTGEOM;
  • 15.
    The reward  Application independence – CAD & GIS are applications. – Using application storage protocols invites application dependence.  Enterprise exposure – Spatial has context to all systems within an enterprise framework, – Enterprise value brings enterprise funding.  Enterprise Reliability, Scalability, Security
  • 16.
  • 17.
    Mark Millman –Mizar, LLC mark.millman@mizar.com