•
Need for standards and policies within the GIS
communities has been addressed by
ü OGC
(Open Geospatial Consortium)
ü FGDC
(U.S Federal Geospatial Data Committee)
ü ISO
(International Organization for Standardization)
OGC defined the core data types and methods that
should supported by GIS systems also defined GML (Geographic Markup Language)
which is an XML encoding tailored for geographical information
Methods for testing
Spatial Database
ü
Equal - Is the geometry spatially
equal to another geometry?
ü
Disjoint - Do the geometry share a point?
ü
Intersect - Do the geometries intersect?
ü
Touch – Do the geometries spatially
touch?
ü
Cross – Do the geometry spatially
cross?
ü
Within – Is the geometry spatially
within another?
ü
Contain – Does one geometry completely
contain another?
ü
Overlap – Do the geometry overlap (must
be same dimension)?
ü
Rotate – are the geometries spatially
related?
Methods for
Analyzing Spatial Geometries
ü
Distance – returns the shortest distance
between any two points in two geometries
ü
Buffer – returns a geometry that
represents all points whose sistance is from given geometry is less than or
equal to distance
ü
ConvexHull – returns a geometry that represents
the convex hull of the geometry
ü
Intersection – returns a geometry that
represents the set intersection of the geometry with another geometry
ü
Union – returns a geometry that
represents the point of union of geometry with another
ü
Difference – returns geometry that
represents the point set difference of geometry with other
ü
SymDifference - returns geometry that
represents the point set symmetric difference of geometry with other
Assertions
ü Standards define assertions for
different geometries
ü Example:
o
A
polygon is defined as a planar surfaces, described by one exterior boundary and
may not have several interior boundaries which defines a hole in polygon
For the above geometry the
assertions are
o
Polygons
are topologically closed
o
The
boundary consist of set of linear rings that define its exterior and interior
boundaries
o
No
two rings in the boundary cross
Feature
ü Defined as, an object with
spatial location and geometric attributes
o
Features are stored as rows in tables and
each geometric attribute is a foreign key that reference a geometry
table or a view
o
Relationships are defined as foreign key
references between feature tables
Spatial reference
system
ü
Also
known as Datum in geometry which stands for size, shape and origin of an
ellipsoid that represents earth
ü
Each
feature should stored in a row and must have a column associated with its
spatial reference system
ü
Spatial
reference system must identify the coordinates of the system
Spatial reference
system table
ü
Stores
spatial reference system in database
ü
Example:
creation of states table
CREATE
TABLE STATES
(
Sname VARCHAR(50) NOT NULL
State_shape POLYGON NOT NULL
Contry VARCHAR(60),
PRIMARY
KEY(Sname),
FOREIGN
KEY(Contry) REFERENCES
CONTRIES (Cname),
);
Example 1:
ü Retrieve
states with an area greater than 50000
SELECT Sname
FROM STATES
WHERE (AREA(State_shape)>50000);
ü Area is a method defined in OGC
standard
Example 2:
A
different statement that will retrieve all the states that share a boundary
with Texas, The touches method returns 1 when the geometry spatially touch
SELECT S1.Sname
FROM STATES S1, STATES S2
WHERE ((TOUCHES (S1.State_shape,S2.State_shape)==1) AND
(S2.State_name=‘Texas’))

No comments:
Post a Comment