Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spatial Database Systems

Similar presentations


Presentation on theme: "Spatial Database Systems"— Presentation transcript:

1 Spatial Database Systems

2 What is a Spatial Database?
A spatial database is a database that is enhanced to store and access spatial data or data that defines a geometric space. Data on spatial databases are stored as coordinates, points, lines, polygons and topology. Spatial RDBMS allows to use SQL data types, such as int and varchar, as well as spatial data types, such as Point, Linestring and Polygon for geometric calculations like distance or relationships between shapes.

3 RDBMS uses the B-Tree series or Hash Function to process indexes, only one-dimensional data can be processed. Since spatial data types are two or three dimensional: R-Tree series or Quad Trees can be used in Spatial RDBMS to process such data; Or it is necessary to transform two or three dimensional data to one dimensional data, then B-Tree can be used.

4 Spatial Database Applications
GIS applications (maps): Urban planning, route optimization, fire or pollution monitoring, utility networks, etc Other applications: VLSI design, CAD/CAM, model of human brain, etc Traditional applications: Multidimensional records ESRI products OSGeo projects

5 Spatial data types region point line Point : 2 real numbers
Line : sequence of points Region : area included inside n-points

6 Spatial Representation

7 HOW RASTER DATASETS REPRESENT REAL-WORLD FEATURES
Different types of data are stored in different file formats.

8 Spatial Relationships
Topological relationships: adjacent, inside, disjoint, etc Direction relationships: Above, below, north_of, etc Metric relationships: “distance < 100”

9 Models, Languages Extent relational model, or use Object-relational model: define new ADTs Query languages: Extend SQL : GEOQL, PSQL New graphical languages: GEO-SAL

10 Examples A database: SELECT * FROM rivers WHERE route intersects R
Relation states(sname: string, area: region, spop: int) Relation cities(cname: string, center: point; ext: region) Relation rivers(rname: string, route:line) SELECT * FROM rivers WHERE route intersects R SELECT cname, sname FROM cities, states WHERE center inside area SELECT rname, length(intersection(route, California)) FROM rivers WHERE route intersects California

11 Spatial Queries Selection queries: “Find all objects inside query q”, inside-> intersects, north Nearest Neighbor-queries: “Find the closets object to a query point q”, k-closest objects Spatial join queries: Two spatial relations S1 and S2, find all pairs: {x in S1, y in S2, and x rel y= true}, rel= intersect, inside, etc

12 EXAMPLE OF SPATIAL SQL NEAREST NEIGHBOR SEARCH

13 Access Methods Point Access Methods (PAMs):
Index methods for 2 or 3-dimensional points (k-d trees, Z- ordering, grid-file) Spatial Access Methods (SAMs): Index methods for 2 or 3-dimensional regions and points (R-trees)

14 Indexing using SAMs y2 y1 x2 x1
Approximate each region with a simple shape: usually Minimum Bounding Rectangle (MBR) = [(x1, x2), (y1, y2)] y2 y1 x1 x2

15 MBR (MINIMUM BOUND RECTANGLE)

16 Indexing using SAMs (cont.)
Two steps: Filtering step: Find all the MBRs (using the SAM) that satisfy the query Refinement step : For each qualified MBR, check the original object against the query

17 Indexing using PAMs Q Q Map the MBR in 2-d into a point in 4-d:
[(x1, x2), (y1, y2)]  (x1, x2, y1, y2) Transform the query into the new space Use a 4-d PAM to answer queries. b Q Q a a b


Download ppt "Spatial Database Systems"

Similar presentations


Ads by Google