Oracle Database Installation Guide 11g Release 1 (11.1) for AIX
Query Processing in 3D Spatial Databases: Experiences with Oracle Spatial 11g
-
Upload
independent -
Category
Documents
-
view
4 -
download
0
Transcript of Query Processing in 3D Spatial Databases: Experiences with Oracle Spatial 11g
<Insert Picture Here>
Query Processing in 3-D Spatial Databases:
Experiences with Oracle Spatial 11g
Siva Ravada, Baris M. Kazar, Ravi Kothuri
2
3D Spatial Systems
• Data Model to handle a variety of 3D Objects– Landmarks, buildings, bridges, point clouds
• Data quality control– Validation rules
• Geo-Referencing– Ability to accurately describe the location of 3D objects
• Comprehensive Location based search and Analysis– Nearest, Within-Distance
• Handling level of detail for seamless operation
• High Performance dissemination of 3D data– Web services, load and publish
• Support High performance real-time 3D rendering
• Support for 3D standards
4
SDO_GEOMETRY for 3D Data
• Points
• Lines
• Simple Surfaces– All points of a surface lie in a 3D plane
– A 3 point 3D polygon is the simplest surface
– A simple surface can have any polygonal shape
• Composite surfaces– has one or more connected simple surfaces
– It can be closed or open
– The simple surfaces in a composite surface can not cross each other
– surface of a cube is an example of a composite surface
• Cube has six simple surfaces
• Each simple surface is a 3D square
5
SDO_GEOMETRY for 3D Data
• Simple Solids – Solids are composed of closed surfaces
– It has to have one outer surface and one or more interior surfaces
– Cube is an example of a simple solid
– A pyramid is another example of a simple solid
• Composite Solids– Consists of n simple solids as a connected solid
– Can be represented as a simple solid with a composite surface
– Topologically there is an equivalent simple solid, but the composite solid representation is easier
• Example: A building composed of rooms
• Simple, composite solids: – Always define a single contiguous volume
6
Specialized Types for High Density 3D Point Data
• Large volumes of point data acquired by sensors
– LIDAR
– Sensors used to collect data inside buildings
• Millions of points used to model a scene
• SDO_GEOMETRY is not suitable for such data
• POINT CLOUD data type introduced to efficiently
manage this type of point data
• TIN to create triangulation of such points
7
Efficient Management of Large 3D Point Data
Pts:
LOBs
BLK_EXTENT:
SDO_GEOMETRYBlkidObjid
Point Block TablePartition the
Input data
8
TABLE of Blocks
SDO_POINT_CLOUD in Oracle
Part it ion into mult iple blocks for granularity of access
Pts:
LOBs
BLK_EXTENT:
SDO_GEOMETRYBlkidObjid
Max_res,Min_res, Attrs,..
Table Column:SDO_POINT_CLOUD
9
TIN: Triangulated Irregular Network
Node No X Y Z
1 5 6 3
2 3 6 5
3 1 5 6
4 4 4 4
5 6 5 3
6 2 2 2
. . . .
• What is a TIN?
– Vector-based topological data model used to represent terrain/surface
– Contain a network of irregularly spaced triangles
– 3D surface representation derived from irregularly spaced points
– Each sample point has an x, y coordinate and a z value or surface value
11
Table Column:SDO_TIN
Triangles:
LOBBlk_extent, Pts..Blkid
TABLE of SDO_TIN_BLK
Res
level
SDO_TIN in Oracle
SDO_PC_BLK
Objid
Features:
– Part it ion into mult iple blocks for granularity of access
– Can store upto 4Billion* 2Billion points
12
Geometry types mapped to City Objects
Composite Solid
Solid Solid
SurfaceSurface
Polygon
Building
House GuestHouse
WallsRoof
Window
13
Indexing and Querying of Geometry Data
• SDO_ANYINTERACT
• SDO_WITHIN_DISTANCE
• SDO_NEAREST_NEIGHBORS
Spatial
Index
Geometry
Engine
Candidate
set
Result
setQuery Spatial
Index
Geometry
Engine
Candidate
set
Result
setQuery
14
Indexing and Querying on Point Clouds and
TINs
Spatial
Candidate Set of blocks
Query Index on
Blk_extents
Geometry Engine Anyinteract
(query, Block/array of pts/triangles)
Result blocks
Pts:
LOBs
BLK_EXTENT:
SDO_GEOMETRYBlkidObjid
Max_res,Min_res, Attrs,..
Table Column:SDO_POINT_CLOUD
15
3-D Geometry Engine: AnyInteract Operation
Solid-Solid
Solid-Surface
Solid-Line
Solid-Point
Surface-Surface
Surface-Line
Surface-Point
Line-Line
Line-Point
Point-Point
If G1 and G2 are solids, we need all of the above routines to
find out if they interact with each other or not.
Set of Primitive operations
16
AnyInteract Operation for Solid-Solid
Solids G1, G2
MBVs
intersect
Eliminate Surfaces of G1 whose
MBVs don’t intersect with
MBVs of G2 (and vice-versa)
Compute R-trees for
Surfaces of G1,G2
Spatial Join of the
two R-trees
Candidate pairs of
intersecting Surfaces
Decompose into
Surfaces
yes
In memory R-tree
17
3-D Geometry Engine- Distance Operation
Geometries
G1, G2
Solid-Solid
Processing
Surface-Line
Processing
Surface-Surface
Processing
Line-Line
Processing
Decompose
Into surfaces
Compute Rtrees for
Surfaces of G1
Geometries
G1, G2
Solid-Solid
Processing
Geometries
G1, G2
Solid-Solid
Processing
Surface-Line
Processing
Surface-Surface
Processing
Line-Line
Processing
Line-Line
Processing
Decompose
Into surfaces
Compute Rtrees for
Surfaces of G1, G2
Geometries
Solid-Solid
Processing
Distance-based
Spatial Join of
two Rtrees
Distance-priority
List of pairs of
Neighbor elems
Top-lvl callyes
Return
Distance
Of First pair
result
18
Experimental Setup
• Comparing the anyinteract and distance processing cost for a TIN blockand a solid box query window.
• The number of points forms a 2-D grid in the TIN and is varied as follows:20-by-20, 50-by-50, 100-by-100, 150-by-150.
• We chose only these sizes of 400 to 22500 points as these numbersrepresent a typical block capacity of a TIN or a point cloud.
• The z value is randomly chosen using a random number within the queryrange.
• The query window itself is varied randomly across the extent of the TINblock and chosen to be either 1% or 0.1% of the underlying TIN blockextent.
19
Experimental Setup- Cont’d
• Using these data, we compared the following alternatives:
– Brute-force: This method compares each triangle in the TIN block to
the query window directly.
– ElemMBV check: This method performs an MBV check of each
element (i.e., each triangle) with the query and if successful, performs
a direct comparison.
– R-tree: This method constructs an R-tree on all the elements
(triangles) first, and then identifies relevant candidates using the R-
tree and performs lower-level comparison on the candidate results.
• Query has few sub-elements (e.g., solid box)
• Query has several (> 20) sub-elements
20
AnyInteract: Query window is a boxThe query response time for different database sizes (query times
on y-axis on logarithmic scale)
21
AnyInteract Experiment #2 Results
Query time (seconds)
R-tree 0.026
ElemMBV check 0.014
Table 1. Query times for a solid geometry (39 faces) vs.
a point query
Query time (seconds)
R-tree 0.036
ElemMBV check 0.093
Table 2. Query times for anyinteract of a Building of 39
faces with another Building of 24 faces
23
Discussion
• For anyinteract computation, use of in-memory R-trees on the geometries is faster if both geometries have a large number of (such as 20 or more) elements
• However, for anyinteract computation, if one geometry has very few sub-elements compared to the second, then R-trees are not the right choice – Instead, processing using ElemMBV check is faster.
• For distance computation, processing using R-trees on sub-elements of geometries is always faster by a factor of 2 or more based on the number of elements