Oracle Spatial Databases
Integrating CAD and GIS
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
– 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
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
Spatial Database ?
Just another data type in a universal enterprise
Reliability, security, scalability, and control are
key to enterprise frameworks:
– Functionality is secondary.
Provides a common format for various GIS
– Ensures application independence;
– Modeled on open standards;
– All information is accessible.
Exposes location to the enterprise
Part of a universal information repository
Structured scalar data
– Text, numbers, dates, etc.
– 140 default document types
– CAD / GI S files
– Indexed contents using Oracle Text
– Image, audio, and video
The in and out of it
Shape file import (Oracle)
Shape file export (GeoTools)
– ArcServer / ArcSDE
Application specific data types, very typical
of advanced CAD applications pose special
problems for any share enterprise
Obfuscated information poses a barrier
and requires customization:
– Annotation is the primary example
– Oriented Points
An extension of the standard POINT
Used for text and symbol orientation
Stores two coordinates
– Absolute location of origin
– A direction vector
Protocols for LRS, N-Dimensional, and
Interpreting Geomedia orientation
Create or replace FUNCTION ORIENT_POINT ( create or replace PROCEDURE ORIENT_LAYER AS
INGEOM MDSYS.SDO_GEOMETRY, BEGIN
) 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.
ETYPE NUMBER; -- The update is in a loop because there are 1.3 million record in
XR NUMBER; dimensions and I was timing out.
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,
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;
-- 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);
-- 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));
– CAD & GIS are applications.
– Using application storage protocols invites
– Spatial has context to all systems within an
– Enterprise value brings enterprise funding.
Enterprise Reliability, Scalability, Security