Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 19

2

Welcome to

Oracle Spatial Workshop


for Management

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1
2
Oracle Spatial
Concepts

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


Objectives

After
After completing
completing this
this lesson,
lesson, you
you should
should be
be
able
able to
to do
do the
the following:
following:
• Describe
Describe the
the supported
supported geometric
geometric data
data types
types
• Define
Define the
the Oracle8i
Oracle8i Spatial
Spatial data
data model
model
• Describe
Describe aa spatial
spatial layer
layer
• Describe
Describe the
the spatial
spatial query
query model
model
• Describe
Describe the
the concept
concept of
of spatial
spatial indexing
indexing
• Identify
Identify spatial
spatial queries
queries and
and spatial
spatial joins
joins

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-3
Types of Spatial Data
GIS (mapping) data CAD data

CAM data

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-4
Geometric Primitive Types

• Points
Points (X1,
(X1, Y1)
Y1)

• Line
Line Strings
Strings (X1,
(X1, Y1,
Y1, Xn,
Xn, Yn)
Yn)
–– self-crossing
self-crossing lines
lines are
are supported
supported
–– lines
lines that
that close
close to
to form
form aa ring
ring have
have no
no area
area
–– straight
straight or
or curved
curved

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-5
Geometric Primitive Types (cont.)

• Polygons
Polygons (X1,
(X1, Y1,
Y1, Xn,
Xn, Yn)
Yn)
–– Polygons
Polygons areare rotation
rotation independent
independent (8.1.5).
(8.1.5). In
In
8.1.6,
8.1.6, outer
outer rings
rings must
must be
be counter
counter clockwise,
clockwise,
inner
inner rings
rings (voids)
(voids) must
must be
be clockwise.
clockwise.
–– coordinates
coordinates must
must close
close and
and interior
interior is
is implied
implied
–– interior
interior area
area can
can be
be voided
voided using
using additional
additional
polygons
polygons (e.g.
(e.g. polygon
polygon with
with holes)
holes)
–– self-crossing
self-crossing polygons
polygons are
are not
not supported
supported
–– straight
straight or
or curved,
curved, optimized
optimized circle,
circle, rectangle
rectangle
Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-6
Geometric PrimitiveTypes (cont.)

• Compound
Compound Line
Line Strings
Strings (X1,
(X1, Y1,
Y1, Xn,
Xn, Yn)
Yn)
–– combination
combination of
of straight
straight and
and curved
curved lines
lines
––self
self crossing
crossing lines
lines are
are supported
supported
––lines
lines that
that close
close to
to form
form ring
ring have
have no
no
area
area
• Compound
Compound Polygons
Polygons (X1,(X1, Y1,
Y1, Xn,
Xn, Yn)
Yn)
–– combination
combination of
of straight
straight and
and curved
curved lines
lines
–– same
same semantics
semantics as
as polygons
polygons
Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-7
Geometric Primitive Types
Arc line Compound Self-crossing
Point Line string string line string line strings

Valid

Polygon Compound Optimized Self-crossing


Polygon polygons
with hole polygon polygons

Not valid
Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-8
Spatial Data Model

Spatial layer

object model only:


Geometries • circular arcs
• circles
• optimized rectangle
• compound linestring
Elements • compound polygon

Point Linestring Polygon Compound Compound


Linestring Polygon

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-9
Elements
• Basic building blocks of a geometry
• Same as geometric primitive types
• Element types Element 5
– Point
– Line Element 4
– Polygon Element 3
– Compound Linestring
Element 6 Element 2
– Compound Polygon
Element 1
• Constructed
using ordinates
Hawaii, USA

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-10
Geometry
Geometry 1 Geometry 2
California Texas
• Represents
Represents aa
spatial
spatial feature
feature
• Consists
Consists ofof an
an
ordered
ordered set
set of
of
elements
elements
Geometry 3 Geometry 4
Florida Hawaii

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-11
Layers

•• Consist
Consist of
of geometries
geometries
that
that share
share aa common
common
set
set of
of attributes
attributes
•• Layer
Layer isis aa geometry
geometry
column
column in in aa table
table

States layer

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-12
Optimized Query Model

Exact
Secondary Result
Primary Set
Filter
Spatial Layer Filter Reduced
Data Data Set Spatial Exact
Spatial Index Result
Functions
Set

Table where Index retrieves Procedures


coordinates are area of interest that determine
stored (window) exact relationship
Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-13
Spatial Indexing
• Two
Two basic
basic types
types
–– Quadtrees
Quadtrees
–– Based
Based on
on aa quad
quad tree
tree
decomposition
decomposition
–– Rtrees
Rtrees
–– Based
Based onon minimum
minimum bounding
bounding
rectangles
rectangles (MBRs)
(MBRs)
• Provides
Provides an an exclusive
exclusive and
and exhaustive
exhaustive
coverage
coverage of of spatial
spatial objects
objects
• Indexes
Indexes points,
points, lines,
lines, and
and polygons
polygons
Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-14
Quad Tree Decomposition of Space

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-15
Primary and Secondary Filter Concept

B B B

B I I B B

B I I I I B
B I I I I B

B I I I I B

B I I I B

B I B B B

B B B

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-16
Spatial Window Queries

• Issued
Issued through
through SQL
SQL
• Contains
Contains aa locational
locational constraint,
constraint, for
for
example:
example:
–– Find
Find all
all policy
policy holders
holders in
in the
the projected
projected
path
path of
of aa hurricane
hurricane
–– Find
Find all
all ATMs
ATMs inin my
my area
area

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-17
Spatial Joins
(Spatial Cross Product)

• A
A join
join of
of two
two layers
layers based
based on
on the
the spatial
spatial
component
component of of the
the layers
layers
• Implemented
Implemented using
using spatial
spatial index
index and
and
spatial
spatial operators
operators
• Very
Very rare
rare
• Example:
Example:
–– Find
Find all
all the
the wetlands
wetlands within
within the
the
national
national parks
parks
Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-18
Summary
In
In this
this lesson,
lesson, you
you should
should have
have learned
learned
about:
about:
• The
The supported
supported geometric
geometric primitive
primitive types
types
• The
The Oracle8i
Oracle8i Spatial
Spatial data
data model
model
• Spatial
Spatial layers
layers
• The
The spatial
spatial query
query model
model
• The
The concept
concept of
of spatial
spatial indexing
indexing
• Spatial
Spatial window
window queries
queries and
and spatial
spatial joins
joins

Copyright  Intergraph Hong Kong Limited, ®

Oracle Corporation, 2002. All rights reserved.


1-19

You might also like