Spatial Data Types - PowerPoint PPT Presentation

1 / 58
About This Presentation
Title:

Spatial Data Types

Description:

approaches of Spatial data types and operations. Emphasis : Understanding ... Example: Oracle Spatial data cartridge, ESRI SDE. can work with Oracle 8i DBMS ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 59
Provided by: psri9
Category:

less

Transcript and Presenter's Notes

Title: Spatial Data Types


1
  • Spatial Data Types
  • and their
  • Embedding in Query Languages

2
In-Class Presentation
Padmavati Sridhar
  • As Partial Course Requirement for
  • Spatial Databases as a Foundation of
  • Geographical Information Systems
  • (CIS 6930,Fall 2004)
  • Instructor Dr. Markus Schneider

3
Objective
  • To provide a detailed overview of the
  • Modeling
  • Design and
  • Implementation
  • approaches of Spatial data types and operations
  • Emphasis Understanding the basic concepts

4
Outline
  • Introduction to Spatial Databases
  • Spatial Modeling
  • Data Models
  • Modeling of Spatial Data Types (SDTs)
  • Modeling of Spatial Operations
  • Design
  • Formal Definition Methods
  • Implementation

5
Outline
  • Introduction to Spatial Databases
  • Spatial Concepts and Data Models
  • Spatial Data Types
  • Modeling
  • Design
  • Implementation
  • Spatial Operations

6
Introduction to Spatial Databases (1)
  • What Is Spatial Data ?
  • Eg Satellite Images, Weather and Climate Data
  • To extract information, data has to be processed
    with respect to a Spatial frame of Reference (Eg
    Latitude/Longitude )
  • Spatial Queries
  • Queries posed on Spatial Data
  • Eg 1.1 What are the names of libraries within 10
    miles of GNV?
  • Non-Spatial Queries
  • Eg 1.2 What are the names of libraries which
    possessgt10K titles ?

7
Introduction to Spatial Databases (2)
  • Why is a traditional DBMS incapable of managing
    Spatial Data ?
  • Simple Data Numbers, Names, Descriptions etc
  • Database efficiently organized to answer limited
    set of Queries
  • Why does problem arise with a Spatial Query?
  • Problems involved in processing Query Eg 1.1

8
Introduction to Spatial Databases (3)
  • Whos interested in Spatial Data?
  • User Classes
  • Scientific Community (Spatial Data Analysts )
  • (Environmental Studies, Natural Resources,
    Geography)
  • Business Professionals
  • (Marketing Campaigns, Retail Locations)
  • Common Man
  • (Eg Direction Maps, Spatially sensitive Search
    Engines over the internet)
  • Sample Map Application on the Net

9
Introduction to Spatial Databases (4)
  • Spatial DataBase Management System (SDBMS)
  • A Software module that
  • can work with an underlying DBMS
  • supports Spatial Data Models, Spatial Abstract
    Data Types (ADTs) and a query language
  • supports Spatial Indexing, efficient Algorithms
    for processing spatial operations, and domain
    specific rules for query optimization
  • Example Oracle Spatial data cartridge, ESRI SDE
  • can work with Oracle 8i DBMS
  • Has spatial data types (e.g. polygon), operations
    (e.g. overlap) callable from SQL3 query language
  • Has spatial indices, e.g. R-trees
  • Oracle Spatial Oracle Locator

10
Fundamental Issue in SDBMS
  • Definition and Implementation of
  • SPATIAL DATA TYPES (SDTs)
  • SDTs provide the fundamental abstraction for
    modeling the geometric structure of
    spatially-referenced objects, and their spatial
    Relationships, Properties and Operations

11
Three Layer Architecture of SDBMS
12
Outline
  • Introduction to Spatial Databases
  • Spatial Modeling
  • Data Models
  • Modeling of Spatial Data Types (SDTs)
  • Modeling of Spatial Operations
  • Design
  • Formal Definition Methods
  • Implementation

13
Spatial Data Models
  • Models of Spatial Information
  • Field Based
  • Object Based

14
Field /Space Based Model
  • Each point in space is associated with one or
    several attribute values, defined as continuous
    functions in x and y
  • f(x,y)

Wheat, 0ltxlt4 2ltylt4
Rice, 0ltxlt2 0ltylt2
Maize, 2ltxlt4 0ltylt2
x
15
Field Based Model Concepts
  • Spatial Framework is a partitioning of space
  • e.g., Grid imposed by Latitude and Longitude
  • Field Functions
  • f Spatial Framework ? Attribute Domain
  • Field Operations
  • Eg addition() and composition(o)

16
Field Operations
  • Local
  • value of the new field at a given location in the
    spatial frame-work depends only on the value of
    the input field at that location
  • Eg Thresholding
  • Focal
  • value of the resulting field at a given location
    depends on the values that the input field
    assumes in a small neighborhood of the location
  • Eg Gradient
  • Zonal
  • Zonal operations are naturally associated with
    aggregate operators or the integration function
  • Eg The Average Height of Trees for each species
    in a Forest

17
Object Based Model
  • A Set of Points is identified as an Entity or
    Object
  • An Object has an explicit Identity assigned to
    it.
  • Geographic Object
  • Identity Description Spatial
    Component(Spatial Object)

18
Object Based Model Concepts
  • Objects distinct identifiable things relevant to
    an application
  • Objects have attributes and operations
  • Attribute a simple (e.g. numeric, string)
    property of an object
  • Operations function maps object attributes to
    other objects
  • Illustration from the UF Campus Map
  • Objects roads, landmarks, ...
  • Attributes of Objects
  • Spatial location, e.g. polygon boundary of
    land-parcel
  • Non-Spatial name (e.g. Museum Road), type (e.g.
    interstate, residential street), number of lanes,
    speed limit,
  • Operations on road objects determine center
    line, determine length, determine intersection
    with other roads, ...

19
Spatial objects Classification
  • Spatial Object Types
  • Zero dimensional POINT
  • One dimensional LINE
  • Two - dimensional REGION

20
Zero dimensional POINT
  • Basic Geometry Type POINT
  • Use
  • To represent the location of entities
  • Whose shape is not considered useful
  • Whose Area is quite small with respect to the
    Embedding Space
  • Eg Cities, Churches Spatial extent might be
    reduced to a point on a large-scale map

21
One dimensional LINE
  • Basic Geometry Type POLYLINE
  • Definition
  • A finite set of Line Segments or Edges, such that
    each segment end point (Vertex), is shared by
    exactly 2 segments, except for 2 endpoints
    (Extreme points), which belong to only 1 segment
  • Use
  • To represent Networks Roads, Hydrographs etc
  • Types of Polyline
  • Closed Extreme points are identical
  • Simple No pairs non-consecutive edges intersect
    at any place
  • Monotone A polyline is monotone with respect to
    a line L, if every line L orthogonal to L meets
    the polyline at one point at most.

22
Example 1-D Objects
  • Line Segment
  • Polyline
  • Simple Closed Polyline
  • Non-Simple Polyline
  • Monotone Polyline

23
TwoDimensional REGION
  • Basic Geometry Type POLYGON
  • Definition Region of the plane bounded by a
    Closed Polyline, called its Boundary
  • Use
  • To represent entities with large areas
  • Types of Polygons
  • Simple Boundary is a Simple Polyline
  • Convex For any pair of points A and B in
    Polygon P, the segment AB is fully included in P
  • Monotone A Simple Polygon such that its
    boundary can be split into exactly two monotone
    polylines MC1 and MC2

24
Example 2-D Objects
  • Simple
  • Convex
  • Polygon with Hole
  • Non Simple
  • Monotone

25
Object based Model
  • Note
  • Choice of Geometric Types is arbitrary depends
    on future use of the Entity collection
  • Factors Scale of Interest
  • Eg Airport -gt Point, for Air Links Region, for
    Detailed View
  • Linear Approximation of Entities (1-D and 2-D)
  • Simplifies Database design
  • Leads to Efficient modeling and Querying Spatial
    Information
  • Could be precisely represented with higher-order
    polynomials in x and y

26
Operations on spatial objects Illustration
  • Set Oriented Museum Road intersects Newell Dr
  • Topological Operations Boundary of USA touches
    boundary of Canada
  • Directional Florida is to the south of Georgia
  • Metric Chicago is about 700 miles from New York
    city

27
Spatial Operations Classification
  • Topological relationships
  • e.g., equal, unequal, disjoint, adjacent
    (neighboring), intersect (overlap), meet,
    (touch), inside (in), outside, covered_by,
    contains
  • Spatial operations returning numbers
  • e.g., area, perimeter, length, diameter, dist,
    mindist, maxdist, direction, components
    (cardinality)
  • Metric relationships
  • e.g., in_circle, in_window
  • Spatial order and strict order relationships
  • e.g., behind / in_front_of, above / below, over /
    under, inside / contains
  • Directional relationships
  • e.g., north / south, left / right

28
Spatial Operations Classification
  • Spatial operations returning new spatial objects
  • - object construction operations
  • e.g., union, intersection, difference, center,
    boundary (border), box
  • - object transformation operations
  • e.g., extend, rotate, translate
  • Spatial operations on sets of spatially related
    objects
  • - General
  • e.g., closest, compose, decompose
  • - operations for partitions
  • e.g., overlay, superimposition, fusion, cover,
    windowing, clipping
  • - operations for networks
  • e.g., shortest_path

29
Topological Relationships
  • Invariant under elastic deformation (without
    tear, merge)
  • - Eg Two countries which touch each other in a
    planar paper map
  • will continue to do so in
    spherical globe maps.

30
Directional Relationships
  • Types
  • Absolute
  • Defined in context to a Global Reference System
  • North/South, East/West
  • Object Relative
  • Defined using the orientation of a given object
  • Left, Right, Front, Behind, Above, Below
  • Viewer based
  • Defined with respect to a specifically designated
    Reference Object called Viewer

31
Dynamic Spatial Operations
  • Dynamic Spatial Operations alter the objects upon
    which the operations act
  • Create
  • Reproduce(X) Produces an exact replica of X
  • Split(X) - Creates Objects whose
    aggregation is X
  • Destroy
  • Update
  • Translate Shifts Object position
  • Rotation - Changes Orientation
  • Scale - Changes Shape

32
Object Model vs Field Model
  • Similar to the object model in computer software
  • Programming languages like Java, C, Visual
    basic support Object-Oriented modeling
  • Post-relational databases, e.g. OODBMS, ORDBMS
    support Object-Oriented modeling
  • OGIS standard set of spatial data types and
    operations exists
  • Entity-Relationship Model (Conceptual Design) is
    designed with an implicit assumption of an
    Object-based model

33
Three-Step Database Application Design
  • STEP 1
  • Conceptual Model (Users Model)
  • User Requirements
  • Highly Expressive, versatile, well-defined and
    consistent data types and operations
  • Simplicity for understanding
  • Entity-Relationship (ER) Model
  • Actual Implementation details are not included
  • Focus Datatypes, relationships and constraints

34
Conceptual Model Illustration
  • ER Model
  • 3 Entities Country, City, River
  • 2 Relationships capital-of, originates-in

35
Three-Step Database Application Design
  • STEP 2
  • Logical Model (Designers Model)
  • Actual implementation of a conceptual model in a
    commercial DBMS
  • Eg Hierarchical, Network, Relational
  • Relational Most widely implemented
  • Tightly coupled with formal Query language
    Relational Algebra(RA)
  • RA consists of simple operations that allow
    querying of data organized as Relations

36
  • Logical Model
  • 3 Relations
  • Country(Name, Cont, Pop, GDP, Life-Exp, Shape)
  • City(Name, Country, Pop,Capital, Shape)
  • River(Name, Origin, Length, Shape)
  • Keys
  • Primary Country.Name, City.Name, River.Name
  • Foreign River.Origin, City.Country

37
Sample Data
38
Three-Step Database Application Design
  • Logical Model (Designers Model)
  • Issues
  • Visibility
  • Designer decides whether the internal structure
    of spatial objects is made visible at the users
    level(Query language) or only to domain-specific
    operations
  • Formal Definition
  • To guarantee Clarity and Consistency at both the
    Users and Implementation levels
  • Fundamental Datatypes
  • Numerical, String, Boolean Inadequate for
    Spatial Applications
  • Requires collection of Spatial Data Types (ADT)
  • Fixed, Standard set universal to all Geo-Apps
    Completeness ?
  • A Kernel-set of App-independent SDTs
    Extensibility ?
  • Contradicting concepts of Minimality and
    Convenience

39
Three-Step Database Application Design
  • STEP 3
  • Implementation Model (Users Model)
  • Implementation strategies
  • Data Structures Representation of Spatial
    Objects
  • Algorithms Operations on Spatial Objects
  • Issues
  • Storage (Physical File structures)
  • Indexing
  • Memory Management

40
Extending SQL for Spatial Data
  • Motivation
  • SQL has simple atomic data-types, like integer,
    dates and string
  • Not convenient for spatial data and queries
  • Spatial data (e.g. polygons) is complex
  • Spatial operations topological, euclidean,
    directional, metric
  • SQL 3 allows user defined data types and
    operations
  • Spatial data types and operations can be added to
    SQL3
  • Open Geodata Interchange Standard (OGIS)
  • Half a dozen spatial data types
  • Several spatial operations
  • Supported by major vendors, e.g. ESRI,
    Intergraph, Oracle, IBM,...

41
Spatial Object Types in OGIS Data Model (1999)
42
OGIS Spatial Data Model
  • Consists of base-class Geometry and four
    sub-classes
  • Point, Curve, Surface and GeometryCollection
  • Operations fall into three categories
  • Apply to all geometry types
  • SpatialReference, Envelope, Export,IsSimple,
    Boundary
  • Predicates for Topological relationships
  • Equal, Disjoint, Intersect, Touch, Cross, Within,
    Contains
  • Spatial Data Analysis
  • Distance,Buffer,Union, Intersection, ConvexHull

43
Spatial Query Types
  • Simple SQL SELECT_FROM_WHERE examples
  • Spatial analysis operations
  • Unary operator Area
  • Binary operator Distance
  • Boolean Topological spatial operations - WHERE
    clause
  • Touch
  • Cross
  • Using spatial analysis and topological operations
  • Buffer, overlap
  • Complex SQL examples
  • Using spatial analysis and topological operations
  • Aggreagate SQL queries
  • Nested queries

44
Spatial Query Examples (1)
  • Using spatial operation in SELECT clause
  • Query List the name, population, and area of
    each country listed in the Country table.
  • SELECT C.Name,C.Pop, Area(C.Shape)AS "Area"
  • FROM Country C
  • Note This query uses spatial operation,
    Area().Note the use of spatial
  • operation in place of a column in SELECT clause.

45
Spatial Query Examples (2)
  • Using Spatial Operation in WHERE clause
  • Query Find the names of all countries which are
    neighbors of the United States (USA) in the
    Country table.
  • SELECT C1.Name AS "Neighbors of USA"
  • FROM Country C1,Country C2
  • WHERE Touch(C1.Shape,C2.Shape)1
  • AND C2.Name USA
  • Note Spatial operator Touch() is used in WHERE
    clause to join Country table with itself. This
    query is an example of spatial self join
    operation

46
Spatial Query Examples (3)
  • Spatial Query with multiple tables
  • Query For all the rivers listed in the River
    table, find the countries through which they
    pass.
  • SELECT R.Name, C.Name
  • FROM River R, Country C
  • WHERE Cross(R.Shape,C.Shape)1
  • Note Spatial operation Cross is used to join
    River and Country tables. This query represents a
    spatial join operation

47
Spatial Query Examples (4)
  • Using spatial operation in an aggregate query
  • Query List all countries, ordered by number of
    neighboring countries.
  • SELECT Co.Name, Count(Co1.Name)
  • FROM Country Co, Country Co1
  • WHERE Touch(Co.Shape,Co1.Shape)
  • GROUP BY Co.Name
  • ORDER BY Count(Co1.Name)

48
Outline
  • Introduction to Spatial Databases
  • Spatial Modeling
  • Data Models
  • Modeling of Spatial Data Types (SDTs)
  • Modeling of Spatial Operations
  • Design
  • Formal Definition Methods
  • Implementation

49
Design Criteria for Spatial Data Modeling
50
Closure Properties
  • Closure
  • The domains of SDTs (Point, Line, Regions) should
    be closed under Geometric Union, Intersection and
    difference

51
Finite Resolution
  • Euclidean Space is continuous
  • Basis of Computational Geometry Algorithms
  • Compute numbers are finite and discrete
  • Leads to Numerical Robustness and Topological
    Correctness problems
  • D moved to D due to rounding errors

52
Approaches for Topological Correctness
  • Simplicial Complexes
  • Realms

53
Formal Definition Methods
  • Need for Formal Definition Methods
  • Users level
  • Guaranteed clarity and consistency
  • Designers level
  • Better understanding of the complex semantics of
    spatial objects and operations
  • Implementation Level
  • formal specification of SDTs for a possible
    realization
  • First step towards standardization of Spatial
    Data Types (SDTs)
  • Formal definition of SDTs ? Formal definition of
    corresponding
  • spatial operations
  • consideration of the finiteness of computers and
    the problems of numerical robustness and
    topological correctness

54
Formal Definition Methods
  • Point Set Theory
  • Point Set Topology
  • Finite Set Theory
  • Other Formal Approaches

55
Outline
  • Introduction to Spatial Databases
  • Spatial Modeling
  • Data Models
  • Modeling of Spatial Data Types (SDTs)
  • Modeling of Spatial Operations
  • Design
  • Formal Definition Methods
  • Implementation

56
SDT Implementation
  • Goal
  • Implementation of a spatial type system (spatial
    algebra) so that it can be integrated into a DBMS
    (query processing, storage management, user
    interface, etc.), fulfilling the design criteria
  • Tools
  • Data Structures and Algorithms
  • Data Structures Representation for the SDTs
  • Algorithms Implementation of Atomic SDT
    Operations

57
  • Discussion

58
  • Thank You
Write a Comment
User Comments (0)
About PowerShow.com