sql/sda: a query language for supporting spatial data analysis and its web-based implementation...

19
SQL/SDA: A Query Language for Support ing Spatial Data Analysis and Its Web -Based Implementation Written by: Hui Lin Bo Huang IEEE Transaction of Knowledge and Data Engineering (TKDE), July/August, 2001. Presented by Shan Huang (Group 2) Slides Available at http://www.users.cs.umn.edu/~joh/csci8715/HW-list.ht m

Post on 20-Dec-2015

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation

Written by: Hui Lin

Bo Huang

IEEE Transaction of Knowledge and Data Engineering (TKDE), July/August, 2001.

Presented by Shan Huang (Group 2)

Slides Available at

http://www.users.cs.umn.edu/~joh/csci8715/HW-list.htm

Page 2: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Topics:

Motivation Problem Statement Major Contribution Key Concept Validation Methodology Assumption Rewrite

Page 3: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Motivation

Limited GIS-based decision-making Spatial analysis functions no effective interface to support user request

Current spatial query language (Spatially Extended SQLs) Representation of spatial data Management of spatial data

Complexity of current GIS-software

Page 4: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Motivation (contd.)

Find a land parcels suitable for growing coffee. Evaluation criteria

temperature, altitudes, area >1000, etc.

Page 5: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Problem Statement

Given Spatial Data Spatial Data Type Spatial Data Analysis Function

Find Extensions to SQL Web-based Interface for Spatial Data Analysis

Constrains Relational Database SQL with Geometry Types

Objective Easy to use Efficient Ease of Expressing Spatial Questions

Page 6: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Major Contribution

SQL/SDA Restructuring the FROM Clause

Visual Interface and Hybrid Model Takes advantage of the Web

GIS Design in Client/Server Environment

Client – provides a query interface

Server – carry out query processing on spatial databases

Page 7: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Key Concepts

Spatial Feature Spatial attributes (e.g., coordinates and topological relationships) Non-Spatial attributes (e.g., name and size)

Spatial Data Type Geometry: Point, Linestring, Polygon, Collection

Collection: Multipoint, Multilinestring, Multipolygon

Page 8: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Key Concepts (contd.) Spatial Analysis Functions

Function Purpose Function Name

Property Access properties of spatial features

AREA, LENGTH, CENTROID

Spatial Relationship

Test spatial relationships

EQUALS, DISJOINT, TOUCH, WITHIN, OVERLAP, CROSS, INTERSECTS, CONTAINS

Metric Calculate distance and direction

DISTANCE, DIRECTION

Derivation Create a new set of spatial features

VORONOI, BUFFER, CONVEXHULL, INTERSECTION, DIFFERENCE, UNION, FUSION

Page 9: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

OGIS SQL/SDA

Spatial datatypes

Point, Curve, Surface, MultiPoin, MultiCurve, MultiSurface

Point, Curve, Surface, MultiPoin, MultiCurve, MultiSurface

Spatial operations

Basic topological and metric spatial relationships

Richer set of operationsCENTROID, DIRECTION, FUSION

OGIS vs. SQL/SDA

Page 10: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

FROM Clause

Structure and Syntax of SQL/SDA Align with the SQL design concept

SELECT - projection FROM - Cartesian product WHERE - selection

Restructured FROM Clause Employ a subquery Create an intermediate relation as a new derived

attributes Append attributes to the Cartesian product

Page 11: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Key Concepts (contd.)Example of SQL/SDA query Display the land parcels and their corresponding area on the condition that the

landuse type of each parcels brush land and soil type is ‘A’ and area is between 700 hectares to 900 hectares

landuse(ID, Type, Location) soil (ID, type, Location)

SELECT lu.ID, sl.ID, ILocation, areaval FROM ( SELECT *,

OVERLAP ( lu.Location, sl.Location ) AS overlapval, INTERSECTION ( lu.location,sl.location ) AS iLocation, AREA (iLocation) AS areaval

FROM landuse as lu, soil AS sl )

WHERE lu.type = ‘Brushland’ AND sl.type = ‘A’ AND overlapval = True AND areaval > 700 AND areaval < 900

View. In SQL, this is called inline view.

Page 12: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Key Concepts (contd.)

CREATE VIEW LandArea AS SELECT lu.ID AS landID, sl.ID AS soidID, OVERLAP ( lu.Location, sl.Location ) AS overlapval, INTERSECTION ( lu.location,sl.location ) AS iLocation,

AREA (iLocation) AS areaval FROM landuse as lu, soil AS sl WHERE lu.type = ‘Brushland’

AND sl.type = ‘A’

SELECT landID, soidID, iLocation, areaval FROM LandAreaWHERE overlapval = True AND areaval > 700 AND areaval < 900

Page 13: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Key Concepts (contd.)

Solution Fig.2. The

intermediate relation of the FROM clause in query

Page 14: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Key Concepts (contd.)

Solution (contd.)Fig. 3. The result of query

Page 15: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Key Concepts (contd.)Implementation of SQL/SDA on the Web

Client provides query interface

Server Query processor and Spatial

Database Engine (SDE) carry out query processing

Page 16: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Validation Methodology

+ Examples of SQL/SDA queries

+ Case Study Macro Languages of GIS

Difficult to learn No optimization strategy

Previous Spatially Extended SQLs (SESOL) spatial relationship and metric constrains, derivation functions

are not accommodated Spatial functions are applied in the main SELECT or WHERE

clause

Page 17: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Assumption

Spatial indexing is already provided by Spatial Data Engine (SDE)

Users familiar with SQL and relational database familiar with spatial data types and operations

Page 18: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Rewrite

Perform user studies to evaluate the ease of expressing spatial queries

Making the query interface more friendlier Query optimization

Page 19: SQL/SDA: A Query Language for Supporting Spatial Data Analysis and Its Web-Based Implementation SQL/SDA: A Query Language for Supporting Spatial Data Analysis

Thanks!