GeoUML

advertisement
GeoUML a conceptual data model
for geographical data
conformant to ISO TC 211
Main GeoUML constructs
Novembre 2004
Alberto Belussi
How does GeoUML conform to ISO standards
TC 211?
GeoUML is defined starting from ISO General
Feature Model (19109) and from ISO Spatial Schema
(19107) by applying the following approach:
General Feature Model
(GFM) in UML
Spatial Schema in
UML
Profiling
Subset of the ISO
constructs (UML classes)
Specialization of ISO
constructs
(UML classes + OCL)
Specializing
Constraints templates and
schema templates
(UML classes + OCL)
GeoUML
Overview of GeoUML
Data Model
GeoUML
General Feature Model
(GFM) in UML
“Segmented”
Attribute
Structural
Constraints
Topological
Constraints
ISO TC 211
General Feature Model
(GFM) in UML
Layer
Spatial Schema
Geometric
Classes in
UML (GU_*)
UML Classes
(GM_*)
Reference Set
of Topological
Relations
Relate
Operators
Specialized constructs
The General Feature Model (GFM)
GFM contains the following constructs:
• Feature Type: “a feature type is an abstraction of real world
phenomena”
• Attribute: thematic and spatial attributes
• Association between feature types
• Generalization and specialization of feature types
• Constraint
Reality:
phenomena
DB Schema
Feature types
and their
properties +
constraints
DB Content
Feature instances
The General Feature Model (GFM)
Basic Rules for representing GFM in UML
• Feature Type: it becomes a UML class
• Attribute:
• a thematic attribute becomes a UML attribute
• a spatial attribute becomes a UML attribute with a spatial
type (or an association to a spatial type)
• Association between feature types: it becomes a UML
association
• Generalization and specialization of feature types: it becomes
a UML inheritance hierarchy
• Constraint: it becomes a OCL (Object Constraint Language)
constraint
GeoUML
Specialization approach
The formal definition of the GeoUML constructs
follows a few general patterns:
–
–
–
geometric types: specializations of ISO geometric types,
adding OCL constraints that restrict the population (objects
belonging to the type extension);
structural constraints: logic formulas with parameters
(constraint templates in OCL), that involve the Contains and
the Complex association of GM_Complex;
topological constraints: constraint templates, involving the
Relate functions defined on the root class GM_Object of the
ISO spatial types hierarchy.
Other constructs of GeoUML
Beyond geometric types, structural and topological
constraints GeoUML contains the following additional
constructs:
– Structural layers
– Enumerative domains
– Hierarchical enumerative domains
– Primay key constraints
– Segmented and subregion attributes
Moreover, a syntax for a textual representation of
application schemas is provided.
GeoUML
The choosen geometric types
Geometric types of the Spatial Schema (ISO TC 211)
GM_Primitive
GM_Point
GM_Curve
GM_Object
GeoUML geo-types
GM_Complex
GM_Aggregate
GM_Composite
TP_Object
GM_Surface
TP_Primitive
TP_Complex
Specialization of geometric types in GeoUML
New types have been defined as specialization of the basic
geometric types of the Spatial Schema (ISO 19107).
In particular, these new types aim to represent:
–
homogeneous complexes: the new 2 types
“ComplexCurve” and “ComplexSurface” are
specializations of the ISO GM_Complex class;
–
geometric objects embedded in 2D or 3D spaces: they
are a specialization of geometric classes for dealing with
the existence of 2D and 3D geometric objects.
Specialization of geometric types in GeoUML
(Complexes)
Motivation of GM_Complex specialization:
• In the IntesaGIS project it was necessary to represent
geometries having a shape of dimensionally homogeneous
complexes.
• Homogeneous complexes are necessary to express
topological relations on complexes, since they admit the
definition of a general boundary function.
In GeoUML three classes have been defined as specialization of the
GM_Complex class of the Spatial Schema.
GU_CXCurve2D
GM_Complex
GU_CXCurve3D
GU_CXSurface2D
GeoUML
Specialization of geometric types - summary
GeoUML classes
Parent class of GeoUML
Parent class of Spatial
Schema
Specialization of GM_Point
GU_Point2D
GM_Point
GU_Point3D
GM_Point
Specialization of GM_Composite
GU_CPCurve2D
GM_CompositeCurve
GU_CPCurve3D
GM_CompositeCurve
GU_CPRing2D
GU_CPCurve2D
GU_CPRing3D
GU_CPCurve3D
GU_CPSurface2D
GM_CompositeSurface
Specialization of GM_Complex
GU_Complex2D
GM_Complex
GU_Complex3D
GM_Complex
GU_CXPoint2D
GU_Complex2D
GU_CXPoint3D
GU_Complex3D
GU_CXCurve2D
GU_Complex2D
GU_CXCurve3D
GU_Complex3D
GU_CNCurve2D
GU_CXCurve2D
GU_CNCurve3D
GU_CXCurve3D
GU_CXRing2D
GU_CXCurve2D
GU_CXRing3D
GU_CXCurve3D
GU_CXSurface2D
GU_Complex2D
Specialization of GM_Aggregate
GU_Aggregate2D
GM_Aggregate
GU_Aggregate3D
GM_Aggregate
GU_MPoint2D
GM_MultiPoint
GU_MPoint3D
GM_MultiPoint
GU_MCurve2D
GM_MultiCurve
GU_MCurve3D
GM_MultiCurve
GU_MSurface2D
GM_MultiSurface
GU_MRing2D
GU_MCurve2D
GU_MRing3D
GU_MCurve3D
Classes representing surfaces 2D with boundary in 3D
GU_CPSurfaceB3D
GU_CXSurfaceB3D
GeoUML
Predefined templates for integrity constraints
specification
Spatial Integrity Constraints have been added to the model
because the plain definition of the types of the geometric
attributes does not sufficiently specify the spatial properties of the
database.
GeoUML predefines two template for spatial integrity constraints:
• Templates for Structural Constraints
• Templates for Topological Constraints
Structural constraints of GeoUML
Structural Constraints rely on the sharing of primitives
among complexes (the sharing is based on the Contains
association of the GM_Complex class having roles
subComplex and superComplex, and on the Complex
association).
For example, the constraint
“for each COUNTY there must exist a REGION which
contains it”
could be expressed as:
“for each COUNTY C there must exist a REGION R
such that Supercomplex(C)=R”.
Structural constraints of GeoUML - example
APPLICATION REQUIREMENT
A road network management system must be designed in which
several different networks are defined; the networks can share
some roads and can be integrated with some connecting paths
which are not classified as roads.
The spatial representation of each network is a collection of curves
usually connected in a graph. The roads are described in terms of
their centre lines which are all used in building the spatial
representation of the related networks.
Structural constraints
Pure ISO APPROACH
RoadNetwork
extension
1..*
1..*
RoadInNetwork
1..*
Road
GM_Complex
Contains
path
1..*
GM_CompositeCurve
linear geometry
restriction
the instances of the
class GM_Complex
must be restricted to
contain only
1-dimensional
geometric objects.
and 0-dimensional
objects for their
boundary.
spatial relationship enforcing: each composite curve representing the
geometry of a road belonging to a network in the RoadInNetwork
association must also be associated, through the Contains association, to
the complex representing the geometry of its network
Structural constraints
Pure ISO APPROACH + OCL formulas
{self.element -> forall(a: GM_Primitive | a.dimension <= 1) and
self.element -> forall(a: GM_Primitive | a.dimension = 0 implies
self.element -> exists(b: GM_Primitive | b.boundary() -> includes(a)))},
{self.dimension() = 1}
RoadNetwork
extension
+net 1..*
Contex Road
inv: self.path.superComplex ->
includes(self.net.extension)
GM_Complex
+superComplex
Contains
RoadInNetwork
+road
1..*
Road
1..*
+subComplex
path
1..*
GM_CompositeCurve
Structural constraints
GeoUML APPROACH
BelongsTo spatial
association between a
contained class C1 and a
containing class C2,
it imposes to each road of
the class Road related to a
network of the class
RoadNetwork that the
geometry of the road
(path) is a subcomplex of
the geometry of the
network (extension).
RoadNetwork
extension : GU_CXCurve
extension
1..*
+net
<<BelongsTo>>
RoadInNetwork
+roads
path
1..*
Road
path : GU_CPCurve
GU_CXCurve
It is a specialization
of the type
GM_Complex that
restricts the
primitives to be only
curves and points;
Structural constraints of GeoUML
Template of the BELONGS TO constraint
Y
gY
+rY
Contex X
inv: self.gX.superComplex
-> includes(self.rY.gY)
GU_Complex
A
gX
+superComplex
+subComplex
+rX
X
Contains
Structural constraints of GeoUML
Application of the BELONGS TO constraint Template
RoadNetwork
extension : GU_CXCurve
extension
extension
RoadNetwork
GM_Complex
Y
1..*
+net 1..*
+superComplex
gY
1..*
+rY
<<BelongsTo>>
RoadInNetwork
Contex Road
Contex Xinv: self.path.superComplex ->
includes(self.net.extension)A
inv: self.gX.superComplex
GU_Complex
RoadInNetwork
-> includes(self.rY.gY)
gX
+superComplex
Contains
+subComplex
+rX
path
1..*
Road
path : GU_CPCurve
X +road 1..*
Road
+subComplex
path
Contains 1..*
GM_CompositeCurve
Specialization of geometric types in GeoUML
(2D – 3D embedding space)
GeoUML
• each GeoUML schema contains the definition of at least 2 objects
of the class SC_CRS (Coordinate Reference System) of ISO
19111 “Spatial Referencing by coordinate”: one for 2D space
(GU_CRS-2D) and one for 3D space (GU_CRS-3D).
• In GeoUML for each class imported from the Spatial Schema,
two separate classes has been defined, one for each SC_CRS.
GU_Complex2D
self.CRS = GU_CRS-2D
GU_Complex3D
self.CRS = GU_CRS-3D
GM_Complex
OCL formulas
Specialization of geometric types in GeoUML
(2D – 3D embedding space)
Since it is necessary to express relations between geometric
objects embedded in 2D space and geometric objects embedded
in 3D space, in each geometric type of GeoUML the method
planar is defined. It produces the projection in 2D of the
geometric object.
GU_Object::planar( ): GU_Object
 self.planar() = self.transform(GU_CRS-2D) 
OCL formulas
Topological constraints of GeoUML
Why is it necessary to predefine a reference set of topological
relations?
• very often spatial constraints in an application schema are
based on topological relations
• ISO Spatial Schema proposes the “Relate” functions to define
topological relations between geometric objects but they cannot be
applied to generic complexes.
• OCL expressions using the “Relate” functions are complex and they
may depend on the geometric classes of the objects participating to
the constraint.
Topological relations of GeoUML
GeoUML contains the set of topological relations defined by
Clementini et. al. since:
– this set contains a reduced number of relations,
– these relations are very clear for the end user, since they
represent spatial properties that can be found in any natural
language
– their definition does not depend on the geometric classes of
the objects participating to the constraint.
RELtopo= { disjoint (DJ), touch (TC), in (IN), contains (CT),
equal (EQ), cross (CR), overlap (OV) }
Topological relations of GeoUML
Given two geometric values A and B, for which we can compute the
interior (A° e B°), the following topological relations can be defined:
–
–
–
–
–
–
(A Disjoint B)
(A Touch B)
(A In B)
(A Contains B)
(A Equal B)
(A Overlap B)
def (A  B =  )
def (A°  B° =  ) and (A  B   )
def (A  B = A) and (A°  B°   ) and (A  B  B )
def (B In A)
def (A  B = A) and (A  B = B)
def (A°  B° ) and (A  B  A) and (A  B  B)
where  indicates the set intersection between two point sets.
Other relations:
(A Cross B) def (A Overlap B) and (dim(A)=1) and (dim(B)=1) and (dim(A°  B°)= 0)
(A Intersects B) def (A  B   ) and not (A Equal B)
Topological relations of GeoUML
Definition of the set RELtopo using OCL + cRelate
cRelate (a, b, M(a,b)): boolean
M(a,b) =
 a.boundary()  b.boundary() a.boundary()  b. int erior() a.boundary b.exterior() 


 a. int erior()  b.boundary() a. int erior()  b. int erior() a. int erior()  b.exterior()
 a.exterior()  b.boundary()
a.exterior()  b. int erior() a.exterior()  b.exterior() 

Problems:
– cRelate can be appled to primities, composites and to
homogeneous complexes, as stated explicitly in the
standard documents,
– the function boundary for the GM_Complex has not been
defined in details by the standards,
we introduced an explicit set of classes for representing
homogeneous complexes and we gave the formal
definition of boundary for these classes.
Topological relations of GeoUML
Topological relations of GeoUML
DISJOINT
TOUCH
IN
DISJOINT
TOUCH
IN
DISJOINT
EQUAL
Topological constraints of GeoUML
The basic idea of a topological constraint applied to a class C
is to express the fact that:
for each object c, instance of class C,
there mustfor
exist
an object d, instance of a class D, such that
each
the topological relation R(c,d) is true
For example, the constraint
“for each PROVINCIA there must exist a REGIONE which
contains it”
could be expressed as
“for each PROVINCIA P there must exist a REGIONE R
such that CONTAINS(R,P)”
Topological constraints of GeoUML
The variety of constraints is determined by:
• the set of topological relations
• different possibilities of selecting the objects of C and the
objects of D
• the possibility to refer to geometric functions, like boundary
and planar, in the expression of the relation (e.g. dam.planar in
lake.boundary)
• the possibility to couple a constraint with an association
between the classes that participate to the constraint
• the possibility of computing the union of the geometric objects of
D before testing the relation
• the possibility of substituting the existential quantifier with a
universal quantifier
Overview of GeoUML
Topological Constraints - Example
Town
Traffic Element
Traffic Area
Railway Station
Overview of GeoUML
Topological Constraints
Example
OVERVIEW OF GeoUML
• Specialization of the geometric types of the Spatial
Schema
• Structural constraints
• Definition of topological relations also for complexes
(dimensionally homogeneous complexes)
• Topological constraints
• “Segmented” attributes and “Subregion” attributes
• Layers
Segmented Attributes
GeoUML contains two kinds of predefined schemas for
representing “segmented” attributes:
• structural segmented attributes: in this case the geometry of
each homogeneous segment is explicitly generated;
homogeneous segments are segments with the same value
with respect to the segmented attributes of the class that we
choose to represent together;
• dinamic segmented attributes: in this case, in the class where
the attribute is defined, a linear reference system is generated
and the values of the segmented attributes can be defined on
this linear reference system by means of linear or point
events.
Segmented Attributes
Structural segmented attributes:
Short form
Extended form
Road
path : GU_CPCurve3D
...
Road
path : GU_CPCurve3D
...
path
1
path
<<segments>>
<<Constraint on Association>>
Road_pathSegments_TrackOfRoad
constraint type = qdj-BelongsTo
<<Domain>>
TRACK_TYPE
....
<<Segment>>
TrackOfRoad
trackType : TRACK_TYPE
<<Domain>>
TRACK_TYPE
....
0..*
geometry
TrackOfRoad
trackType : TRACK_TYPE
geometry : GU_CXCurve3D
Segmented Attributes
Dinamic segmented attributes:
Road
path : GU_CP Curve3D
...
Extended form
path
Road
< < events > >
path : GU_CPCurve3D
1..*
path
<<Constraint on Ass ociation>>
Road_pathArcs
constraint type = qdj-BelongsTo
1
Road_pathEvent_Track OfRoad
Short form
{ordered}
0..*
< < E vent> >
Trac k OfRoad
s tartM eas ure : real
endM eas ure[0..1] : real
m eas ureUnit = m eter
m ethod = abs olute
Trac k Ty pe : TRA CK _TY P E
0..*
TrackOfRoad
TrackType : TRACK_TYPE
s tartMeasure : real
endMeasure [0..1] : real
geometry
ArcsOfRoad_path
geometry : GU_CPCurve3D
length : real
measureUnit = meter
GM_Primitive
Primitives are geometric objects representing OPEN
connected pointsets. GM_Primitive is the parent node of three
classes: GM_Point, GM_Curve and GM_Surface.
GM_Point
GM_Curve
GM_Surface
GM_Composite
Composite objects are set of primitives representing a primitive
decomposed in its components (structure).
They represent CLOSE connected pointsets. They are always
dimensionally homogeneous.
GM_CompositeCurve
GM_CompositeSurface
GM_Complex
Complex objects are set of primitives satisfying the following spatial
constraints:
a. the primitives belonging to a complex are disjoint
b. if a primitive belongs to the complex also its boundary belongs to
the complex
They allow the sharing of geometry.
GM_Aggregate
Aggregate objects are sets of primitives with no constraints.
dimensionally
homogeneous
non dimensionally
homogeneous
Homogeneous Complexes
GM_Complex
GU_CXCurve2D
GM_CompositeCurve
GU_CXSurface2D
GU_CXCurve2D
Download