Más contenido relacionado La actualidad más candente (8) Similar a Presentazione jrc 24 ottobre (20) Presentazione jrc 24 ottobre1. Inspire Data Model Browser
Alberto Belussi, Mauro Negri,
Giuseppe Pelagatti
Politecnico di Milano
giuseppe.pelagatti@polimi.it
October 24, 2013
2. Index
1. General Architecture, derivation from GeoUML tools and state
of the art
2. Inspire Data Model (IDM) and Browser (IDMB):
– IDM rules
– use of IDMB by non-UML expert
– use of IDMB by UML experts for Schema Maintenence
3. Inspire DB and SQL Mapping Generator
– motivation
– comparison with similar approaches/tools
Discussion – how to go on
© 2013 - Pelagatti Giuseppe
2
3. 1) General Architecture
schema in
EAP format
INSPIRE
SCHEMA
LOADER
INSPIRE DATA MODEL
BROWSER (IDMB)
(Inspire Data Specifications)
WFS
Configuration
SQL mapping generator
SQL
Schema
WFS
Source
Databases
SQL
scripts
INSPIRE
DATABASE
(e.g. PostGis)
© 2013 - Pelagatti Giuseppe
GML
datasets
VALIDATOR
3
4. Derived from GeoUML Tools
6 different
Implementation
Models on
different
technologies:
• SQL,
• Shapefiles,
• GML
Source
Dataset
GeoUML Catalogue
(Data Specification)
Mapping Generator
Physical
Structure
XML Data
Specification (scs format)
GeoUML
Physical
Model Validator
Diagnostic
Information
Reader
© 2013 - Pelagatti Giuseppe
4
10. GeoUML Tools Experience
• Catalogue has been adopted to model the Italian National Core
data specification (legally mandatory for italian public
administrations since 2012): 150 classes and 90 spatial constraints
• Each administration can use the Catalogue (Editor) to extend the
National Core for its specific requirements, provided that the
mandatory content is preserved
• Each administration can choose its own Implementation Model
• Validator has been applied in several productions, some of which
are rather large, e.g.:
– Provincia di Sondrio: 78 municipalities, 3195 km2, 100 classes
and 50 constraints)
– Regione Basilicata: 10000 km2 (full National Core)
© 2013 - Pelagatti Giuseppe
10
11. GeoUML Tools Experience - 2
• Provincia Autonoma di Trento has financed an
extension to the Validator in order to use it in its
Information System: the Validator can now be invoked
through an API
• Regione Lombardia is using the tools for its Regional
SDI (essentially for transferring local updates to the
central database):
– the interchange format has been defined using the
Catalogue and the ShapeFlat Implementation
Model
– the use of the Validator for checking the quality of
updates is being evaluated
© 2013 - Pelagatti Giuseppe
11
12. GeoUML Tools Experience - 3
Distribution and downloads:
– Currently only the Catalogue Viewer is distributed to
everybody; the Editor and Validator are distributed
only to public administration
– From the next release (november 2013) these
restrictions will be eliminated
– About 280 (different) downloads of the Viewer (50%
by privates)
© 2013 - Pelagatti Giuseppe
12
13. 2) Inspire Data Model – Main Rules
• Defined in Inspire Generic Conceptual Model and
Referenced Standards
• Rules = Restrictions to generic UML class diagrams
a. Feature Classes cannot be the type of an attribute
b. Datatypes, Codelists and Enumerations cannot be the
Target of a Role
c. Datatype containment cannot be cyclic (including
inheritance)
d. Inheritance Hierarchies are homogeneous in stereotype
© 2013 - Pelagatti Giuseppe
13
14. Additional Restrictions of the
current Release
Applied in current IDMB to reduce development cost and time
(can be removed)
e. Union stereotypes currently not supported
f. Datatypes, Codelists and Enumerations do not have Multiple
Inheritance
g. If an attribute is of type DT and DT is a datatype having
subdatatypes DT1, DT2, … then DT, DT1, DT2, … cannot
have attributes of type datatype DTX which has subdatatypes
DTX1, DTX2 …
h. limitations on cardinality domain
© 2013 - Pelagatti Giuseppe
14
15. What data are loaded in IDMB?
• Extracted from Inspire2010-04-26_r937.EAP
• Without:
– Foundation Schemas
– class INSPIRE THEME XX::SpatialObjectWithAName
• some additional <basic types>:
– Spatial types (GM_...) used by Annex 1
– ….
• + Selected ISO Types
– from ISO 00639 Language Codes: <codelist> LanguageCode
– from ISO 19103 Schema Language: Bit, Digit, Sign, StandardUnits,
UnitsList
– from ISO 19115
© 2013 - Pelagatti Giuseppe
15
16. Few Problems discovered in Loading
• 4 Classes used as Attribute Types (violation of rule (a)):
– Percentage for attributes:
• percentageUnderDesignation of class DesignationType,
• percentageUnderHabitat of class PresentHabitatType,
• percentageOfSiteCoveredByProtectedEntity of class
ProtectedEntityType
– NetworkArea for attribute: officialsiteArea of class ProtectedSite
– LinkSequence for attribute: aggregatedLink of class LRSElement
– Link for attribute: link of class LRSElement
• Cardinality without Role (DirectedLink)
• Roles which are not represented in the EA diagrams (example:
"SpeciesAggregationUnit" in package "Species distribution (Annex III)" has
role "isAggregatedOver" to featuretype "Protected Site” )
© 2013 - Pelagatti Giuseppe
16
17. IDMB for non-UML experts
• To some extent an answer to the requirement stated in
Florence by Anders Ryden in «Analysis of Inspire DS –
A stepwise approach»
• DEMO (in parallel with EA diagrams):
–
–
–
–
Road,
NetworkProperty,
ProtectedSite (full) – designationvalue,
…
© 2013 - Pelagatti Giuseppe
17
18. IDMB for design and maintenence of
an Inspire Data Schema
• Control of the IDM rules (EA does not)
• Contribution to understanding of an UML schema developed
in EA:
– different navigation
– Statistics are possible (e.g. how many feature types,
percentage of abstract classes, average depth of
inheritance hierarchies, …)
• Requires the development of the IDM Loader (currently ad
hoc operations) and the elimination of the restrictions of the
current Release
© 2013 - Pelagatti Giuseppe
18
19. IDMB and INSPIRE MIF
Statistics and
Analysis by
different
navigation
Updates
schema in
EAP format
Errors
(violations of
IDM rules)
INSPIRE
SCHEMA
LOADER
INSPIRE DATA MODEL
BROWSER (IDMB)
(Inspire Data Specifications)
© 2013 - Pelagatti Giuseppe
19
20. 3) Inspire DB, Mapping and WFS
Goals of Inspire DB
– Supporting the implementation of WFS for spatial data
having complex structure (this is the case of INSPIRE
datasets)
– Guaranteeing the satisfaction of integrity constraints by
database content thus ensuring high quality of provided
data
– Possibly improving the performance of spatial queries
and Xlink navigation (WFS 2.0)
– Possibly providing the ability of managing incoming
data through WFS-T service
– being an SQL Reference Implementation
© 2013 - Pelagatti Giuseppe
20
21. Features of Inspire Database
• Primary key and unique constraints derived from Data Specification are
added to the SQL schema
• Foreign key constraints are also specified in order to deal with referential
integrity of roles and other links among tables. Constraints involving different
tables are handled.
• Cardinality constraints are added in order to check required attributes and
roles.
• Views can possibly be added to obtain the extent of superclasses in hierarchies
• Geometric domains are specialized and constrained in order to guarantee that
the represented geometries have the correct type (POINT, LINESTRING,
POLYGON, …) and the correct coordinate dimension
• Spatial indices are defined on every geometric attribute
• No redundancy is introduced for the representation of a role together with its
corresponding inverse role.
© 2013 - Pelagatti Giuseppe
21
22. SQL schema generation rules
Main general rules:
• Each class has a reference table (master) with a unique identifier
(ClassID) used for providing the GML:id
• Each atomic property of a class with max cardinality equal to one
(mono-property) is represented in the class reference table; the
same behaviour is adopted for each attribute of a datatype
property of a class, provided that it is mono-property.
• Each atomic or datatype property with max cardinality greater
than one or equal ‘*’ (multi-property) produces an additional
table (slave) having a foreign key (ClassREF) with an integrity
constraint towards the master table.
© 2013 - Pelagatti Giuseppe
22
23. SQL schema generation rules
Main general rules (cont.):
• Each role with max cardinality greater than one or equal
‘*’ (multi-role) without inverse role or having an inverse
multi-role produces an additional table (slave) having two
foreign keys (ClassREF_0, ClassREF_1) with integrity
constraints towards the master tables.
• Additional views are added to handle the reference to the
features/objects/codes belonging to a hierarchy of feature
classes/datatypes/code lists.
© 2013 - Pelagatti Giuseppe
23
26. Comparison with database generated
from XSD
(Deegree approach)
• Primary key and unique constraints cannot be always derived from XSD
syntax
• Foreign keys cannot be specified in XSD syntax, thus are not defined in SQL
schema derived from XSD
• Cardinality constraints and domain constraints can be derived from XSD
syntax, but are not always specified in SQL schema.
• Geometric types cannot always be derived from XSD syntax.
• Spatial indices are a possible choice when a geometric attribute is defined,
however schema generators do not always produce them
• Redundancy in role/inverse role implementation cannot be avoided starting
from XSD syntax, since inverse roles are not specified.
© 2013 - Pelagatti Giuseppe
26
27. Example: a DB generated by deegree
Primary key
completely
useless
no Foreign key
constraint
no Foreign key constraint
and redundancy
no Foreign key constraint and
redundancy
© 2013 - Pelagatti Giuseppe
27
30. The Inspire DB as a target for
mapping from existing
production database
The Data producer has to define and implement the SQL
scripts which transfer the data from their Source
Database to the Inspire Database. This could be easier
than directly producing the input to a WFS.
Source
Database
SQL
scripts
© 2013 - Pelagatti Giuseppe
INSPIRE
DATABASE
30
31. 4) How should we go on?
Depends on the answer to the following 3 questions:
1. Do you think that IDMB can be useful for facilitating
the understanding of Inspire DS by non UMLexperts?
2. Do you think that IDMB + Inspire Schema Loader can
be useful for Inspire Schema Maintenence?
3. Do you think that the Mapping Generator and Inspire
Database can be useful for the Inspire Data Producers?
A positive answer to each one of these questions can have
consequences for the prosecution of this project.
© 2013 - Pelagatti Giuseppe
31
32. IDMB for facilitating the
understanding of Inspire DS by nonUML experts
• Actions (already decided by SpatialDBGroup)
– complete the features of IDMB
– distribute it free
• Problems and Opportunities
– how to provide some kind of certification (formal or not)
– how to disseminate
– use in training?
© 2013 - Pelagatti Giuseppe
32
33. IDMB + Inspire Schema Loader for
Inspire Schema Maintenence
• Actions
– refine requirements for maintenence (e.g. useful
statistics…)
– produce an usable Inspire Schema Loader
• Problems
– financial support
© 2013 - Pelagatti Giuseppe
33
34. Mapping Generator and Inspire
Database for the Inspire Data
Producers
• Actions:
– find interested parties (stakeholders)
– define detailed rules for critical aspects
– complete the production of the Schema Generator
• Inspire Data Producers could be also interested in:
– Applying the Validator on the IDM
© 2013 - Pelagatti Giuseppe
34
35. IDM and Italian National Core:
a Mapping project
• We are studying the possibility/usefulness to support the
mapping between a NC database and the Inspire
database by connecting the GeoUML catalogue and the
IDMB
• If this approach can be useful we will ask financial
support from CISIS (or other interested italian agencies)
for this project
© 2013 - Pelagatti Giuseppe
35