Anish - PPT - Anish
Anish - PPT - Anish
SPATIAL DATA
Object –oriented systems have had a major influence on expanding the capabilities of
DBMS to support spatial (complex) objects by using the framework of OR-
DBMS(object–relational database management system) which extensions support
notion of user defined types(Abstract data types) just like a C++ and Java.
For example, if we have land parcels stored as polygons in a database, then a useful
ADT may be a combination of the type polygon and some associate function(method),
say, adjacent.
The adjacent function may be applied to land parcel to determine if they share a
common boundary.
OGIS Standard for Extending SQL
Basic Functions:
1. Spatial Reference(): Return the underlying coordinate system of the geometry
2. Envelop(): Return the minimum orthogonal bounding rectangle of the geometry
3. Export(): Returns the geometry in a different representation
4. IsEmpty(); Return true if the geometry is a null set
5. IsSimple(): Return true if the geometry is simple(no self-intersection)
6. Boundary(); Return the boundary of the geometry
Operations in OGIS Standard for Extending
SQL
Topological/Set Operators: Topological operators are used to compare the spatial
relationship between two or more
geometric objects, such as points, lines,
or polygons.
1. Equal : Returns true if the interior and boundary of the two geometries are
spatially equal.
2. Disjoint: Return true if the boundaries and interior do not intersect
3. Intersect: Returns true if the geometries are not disjoint
4. Touch: Returns true if the boundaries of two surfaces intersect but the interiors do
not
5. Cross: Returns true if the interiors of a surface intersects with a curve
6. Within: Returns true if the interior of the given geometry does not intersect with
the exterior of another geometry
Operations in OGIS Standard for Extending
SQL
Spatial Analysis: It is the process of analyzing and interpreting geographic data to gain
insights into the patterns and relationships that exist within the data
1. Distance: Returns the shortest distance between two geometries
2. Buffer: Returns a geometry that consists of all points whose distance from the
given geometry is less than or equal to the specified distance
3. ConvexHull: Returns the smallest convex geometric set enclosing the geometry
4. Intersection: Returns the geometric intersection of two geometries
5. Union: Returns the geometric union of two geometries
6. Difference: Returns the portion of a geometry that does not intersect with another given
geometry
7. SymmDiff: Returns the portions of two geometries that do not intersect with each other
Examples of how SQL queries can be used to
retrieve and analyze spatial data
1. Retrieving Spatial Data:. For ex. SELECT * FROM points WHERE ST_Distance
(point, ’POINT(1.23 4.56 )’)<1000;
2. Analysing Spatial Data: For ex. SELECT ST_Area(polygon) FROM polygon;
3. Aggregating Spatial Data: For ex. SELECT ST_Union(polygon) FROM polygons;
4. Spatial Joins: For ex. SELECT polygons.name, COUNT(points.id) FROM polygons
LEFT JOIN points ON ST_Contains (polygons.polygon, points.point) GROUP BY
polygons.name;
5. Spatial Indexing: For ex. SELECT * FROM polygon && ST_MakeEnvelop (xmin,
ymin, xmax,4326);
Limitations of Extending SQL
Extending SQL for spatial data has greatly improved the management and analysis of
spatial data in relational databases, but there are still some limitations to this approach. Here
are a few:
1. Limited support for complex spatial data
2. Limited support for non-Euclidean geometries
3. Lack of standardization
4. Performance limitations
5. Implementation challenges
Future directions for the development of SQL
extensions for spatial data
1. This paper proposes an extension to SQL for managing and analysing spatial data in
relational databases.
2. The proposed extension provides a powerful and flexible framework for managing
spatial data in a relational database, making it a valuable tool for a wide range of
applications.
3. The proposed extension provides a comprehensive and integrated approach to
extending SQL for spatial data, which supports advanced spatial analysis, indexing,
and querying. Further research and development in this area can lead to more efficient
and effective management and analysis of spatial data in relational databases,
expanding the applicability of SQL for spatial data in various fields
References
1. Spatial Database: A Tour by Shashi Shekhar and Sanjay Chawla
2. B.C. Ooi, R.S. Davis, K.J. McDonnel, "Extending a DBMS for geographical
application," in Proceedings of the 1989 International Conference on Computers in
Design Engineering, San Francisco, CA, USA, Feb. 1989, pp. 421-426, doi:
10.1109/CDE.1989.47266
Thank you