01 Spatial Database 22-9-2016
01 Spatial Database 22-9-2016
01 Spatial Database 22-9-2016
Spatial Database
Harry Imantho, M.Sc
No, if......?
No, if......?
No, if......?
It just shown us the appearance of
its objects contained
-> Simple way - Its just a picture
Thursday, September 22, 16
Is it GIS Data?
HTML Viewer
Java Viewer GIS Desktop
(Internet) Applications
Wireless
Mobile
Devices
Network
Custom
Applications
Map Renderer
Spatial Server Side
DB Applications
Two-dimensional examples
Cartesian coordinates (2-D)
Networks
Direction
Added
Enhanced
Added
(0,0) (1,0)
INSERT INTO boston_buildings(name, area, population, boundary) VALUES('some name', 'some area', 'some
pop', ST_GeomFromText('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))', 4326) )
Thursday, September 22, 16
Value of SDBMS
Non-spatial database management systems provide:
Persistence across failures
Allows concurrent access to data
Scalability to search queries on very large datasets which do not fit inside main
memories of computers
Efficient for non-spatial queries, but not for spatial queries, i.e:
Non-spatial queries:
List the names of all bookstore with more than ten thousand titles.
List the names of ten customers, in terms of sales, in the year 2001.
Spatial Queries:
List the names of all bookstores with ten miles of Minneapolis
List all customers who live in Tennessee and its adjoining states
SDBMS,
do not have spatial analytic and visualization tools common
to GIS,
Functionality
Core Spatial
Access methods
Algorithms
Query language
Operations
Data types
Taxonomy
Interface to DBMS
DBMS
Collections
Polygon collection (e.g. administrative boundary)
Sub Type
Geometry SpatialReferenceSystem
Relationship
Line LinearRing
MultiPolygon MultiLineString
0 0 1 1 1 1 1 0 0 1 0 0
0 0 1 0 0 1 1 0 0 0 1 0
1 1 1 0 0 1 1 1 1 0 0 1
disjoint contains inside equal
0 0 1 1 1 1 1 0 0 1 1 1
0 1 1 0 1 1 1 1 0 1 1 1
1 1 1 0 0 1 1 1 1 1 1 1
meet covers coveredBy overlap
Find the countries of western Europe with population greater than 50 million. This is a projection on the
attribute population.
The lower map represents the overlay of European countries and languages.
x axis
0 2 4 6 8 10
Range query: find the objects in a given range.
E.g. find all hotels in Boston.
E5
E6
E4
E6
Loosely Coupled
Some commercial software such as ArcInfo use this approach.
Uses a RDBMS to store 'attribute' or descriptive information e.g. the name of a
road not its geometry.
A specific module for spatial data management.
Drawbacks:
The coexistence of heterogeneous data models, which implies difficulties in
modeling use and integration.
A partial loss of DBMS techniques e.g. recovery, querying, optimization.
Database Files
Spa$al&Object&and&A0ribute&
stored&in&one&DBMS&
Question/discussion.....
PostGIS supports a geometry type which is compliant with the OGC standard
for Simple Features.
POINT( 50 100 )
LINESTRING ( 10 10, 20 20 )
POLYGON ( ( 0 0, 5 5, 5 0, 0 0 ) )
MULTIPOINT ( ( 1 1 ), ( 0 0 ) )
MULTILINESTRING ( )
MULTIPOLYGON ( )