OGIS Spatial Data type Geometry Spatial Reference system Consists of base class Geometry and four sub Point Curve Surface classes Geometry Collection a Point curve Surface and GeometryCollecti Line String Multisurface Multicurve Multipoint on c LinearIng L Multiply gon Multilinestring 2021/8/25
2021/8/25 16 OGIS Spatial Data type ◼ Consists of baseclass Geometry and four subclasses: ❑ Point, Curve, Surface and GeometryCollecti on
OGIS Spatial Operations a Operations fall into three categories a Apply to all geometry types SpatialReference, Envelope, Export, Is Simple, Boundary a Predicates for topological relationships Equal, disjoint, Intersect, Touch, Cross, Within Contains a Spatial data analysis Distance, Buffer, Union, Intersection, ConvexHull, SymDiff 2021/8/25 17
2021/8/25 17 OGIS Spatial Operations ◼ Operations fall into three categories: ❑ Apply to all geometry types ◼ SpatialReference, Envelope, Export,IsSimple, Boundary ❑ Predicates for Topological relationships ◼ Equal, Disjoint, Intersect, Touch, Cross, Within, Contains ❑ Spatial Data Analysis ◼ Distance,Buffer,Union, Intersection, ConvexHull, SymDiff
Basic Functions SpatialReference() Returns the underlying coordinate system of the geometry Envelope o) Returns the minimum orthogonal bounding rectangle of the geometry Export) Returns the geometry in a different representation IsEmpty O) Returns true if the geometry is a null set. IsSimpleo) Returns true if the geometry is simple(no self-intersection 「 Boundary( Returns the boundary of the geometry Topological/ Equal Returns true if the interior and boundary of the two geometries are spatially equal Operators Disjoint Returns true if the boundaries and interior do not intersect. Intersect Returns true if the geometries are not disjoint Touch Returns true if the boundaries of two surfaces intersect but the interiors do not Cross Returns true if the interior a surface intersects with a curve within Returns true if the interior of the given geometry does not intersect with the exterior of another geometry Contains I Tests if the given geometry contains another given geometry Over lap Returns true if the interiors of two geometries have non-empty intersection Distance Returns the shortest distance between two geometries Analysis Buffer Returns a geometry that consists of all points whose distance from the given geometry is less than or equal to the specified distance ConvexHull Returns the smallest convex geometric set enclosing the geometry Intersection Returns the geometric intersection of two geometries Union Returns the geometric union of two geometries Difference Returns the portion of a geometry which does not intersect with another given geometr SymmDiff Returns the portions of two geometries which do not intersect with each other 2021/8/25
2021/8/25 18
List of Spatial Query Examples Simple SQL SELECT FROM WHERE eXamples aSpatial analysis operations Unary operator Area -Binary operator Distance a Boolean Topological spatial operations-WHERE clause a Touch Cross aUsing spatial analysis and topological operations Buffer, overlap Complex sQL examples a Aggregate SQL queries 口 Nested queries 2021/8/25
2021/8/25 19 List of Spatial Query Examples ◼ Simple SQL SELECT_FROM_WHERE examples ❑Spatial analysis operations ◼Unary operator: Area ◼Binary operator: Distance ❑Boolean Topological spatial operations - WHERE clause ◼Touch ◼Cross ❑Using spatial analysis and topological operations ◼Buffer, overlap ◼Complex SQL examples ❑ Aggregate SQL queries ❑ Nested queries
Using spatial operation in Select clause Query: List the name, population, and area of each country listed in the Country table SELECT C Name, CPop, Area(C Shape)As"Area FROM Country c Note: This query uses spatial operation, Area(). Note the use of spatial operation in place of a column in select clause 2021/8/25
2021/8/25 20 Using spatial operation in SELECT clause Query: List the name, population, and area of each country listed in the Country table. SELECT C.Name,C.Pop, Area(C.Shape)AS "Area" FROM Country C Note: This query uses spatial operation, Area().Note the use of spatial operation in place of a column in SELECT clause