240 likes | 368 Views
GeoSciML Implementation by Agnès Tellez-Arenas. How implement GeoSciML by a Web Service?. First step: data mapping preparation of the services WMS,WFS Data Specification (the attributes delivered). Vocabularies (content of the attributes) Second step: schema transformation
E N D
How implement GeoSciML by a Web Service? • First step: data mapping preparation of the services WMS,WFS • Data Specification (the attributes delivered). • Vocabularies (content of the attributes) • Second step: schema transformation • GML => GeoSciML: WMS.getFeatureInfo, WFS.getFeature • GeoSciML => GML: WMS.getMap using GeoSciML expressed SLD WFS.getFeature using queries • For client applications, what utilisation of GeoSciML?
What a GeoSciML Web Map/Feature Service is? • It is a service delivering features • The features are expressed in several formats: • In Image (getMap request) • In text or HTML (getFeatureInfo) • In XML (getFeatureInfo, getFeature). In that case, the XML delivered is GeoSciML (instead of usual GML).
What a GeoSciML Web Map/Feature Service is? • It is a service delivering features • The Data Model of these features is a schema (a structure) who respects GeoSciML: • Content of the data (numerical, free text, of urn referencing GeoSciML concepts) • Organization of the data (names of the fields and structure).
Example of key attribute/value expressed in GeoSciML • For example, “lithology” is a field named (i.e. the path): “ gsml:composition/gsml:CompositionPart/gsml:lithology@xlink:href ” Which the GeoSciML value is urn:cgi:classifier:CGI:SimpleLithology:2008:sand • Instead of the GML name: “ brgm_litho_multiple ” Which the value is “ sable d’Orléans ” The GML name (and value) is specific to a dataset. The GeoSciML name (and value) is “generic”, harmonized, standard.
What are the steps for implementing a GeoSciML service? First Step: Data Mapping • Create a new dataset, copying the “starting from” dataset A new table in a database, or a new shapefile • Add one column by GeoSciML attribute Depending on the Data Model • From columns of the “starting from” dataset, deduce the textual (or numerical) values of the GeoSciML attributes. This step should require the participation of an IT person and a data content expert (geoscientist).
What are the steps for implementing GeoSciML service? First Step: Data Mapping • Some attributes (depend on the Data Model) must have values took inside a GeoSciML vocabulary. These values are Controlled Concepts identified by URN (Unified Resource Name). A GeoScientist expert must decide, for each possible value (textual value in the “starting from” column), which GeoSciML Controlled Concept corresponds. The GeoSciML Controlled Concepts are organized in trees (hierarchy), therefore the GeoScientist can simplify the “local data” if it doesn’t exist in the GeoSciML vocabulary. The aim is to provide a WMS / WFS delivering usual GML with attributes and values following the Data Specification.
What are the steps for implementing GeoSciML service? First Step: Data Mapping Example • In a GeoSciML Data Model, we decide to store the lithology as up to five fields (to express multiple lithology). • The objective is to produce a dataset with the following attributes: • urn_litho_1, urn_litho_2, urn_litho_3, urn_litho_4, urn_litho_5 • Which each value is took from the official the GeoSciML vocabulary urn:cgi:classifierScheme:CGI:SimpleLithology:200811.xml • In the “starting from” national dataset, lithology is stored inside a unique field named “brgm_litho_multiple”, which values are free texts: • sables, argiles, graviers, galets
What are the steps for implementing GeoSciML service? First Step: Data Mapping Example • Starting from a unique field which value is “sables, argiles, graviers”; the Objective is to obtain: urn_litho_1=urn:cgi:classifierScheme:CGI:SimpleLithology:200811:sand urn_litho_2=urn:cgi:classifier:CGI:SimpleLithology:2008:non_clastic_siliceous_sedimentary_rock urn_litho_3= urn:cgi:classifierScheme:CGI:SimpleLithology:200811:rock urn_litho_4= urn_litho_5= • The GeoSciML path of each lithology field is: • gsml:composition/gsml:CompositionPart/gsml:lithology@xlink:href The GeoSciML vocabularies are available here: http://appgeosciml.brgm.fr/GeoSciMLWeb/middleware.jsp Some GeoSciML vocabularies used for the OneGeology-Europe project: http://appgeosciml.brgm.fr/Voca/www/vocabularyLitho.jsp
What are the steps for implementing GeoSciML service? First Step: Data Mapping Example http://onegeology-europe.brgm.fr/demoServices/index.jsp
Second Step: Implement the GeoSciML schema Starting from the Data Specification implemented in step 1: <msGMLOutput> <onege_wms_layer> <onege_wms_feature> <gml:boundedBy> <gml:Box srsName="EPSG:27582"> <gml:coordinates>22763.700000,1602697.400000 1215763.800000,2682702.500000</gml:coordinates> </gml:Box> </gml:boundedBy> <gid>17722</gid> <urn_strati>urn:cgi:classifier:ICS:StratChart:2008:Holocene</urn_strati> <description_text>Lithologie: sables, argiles, graviers, galets</description_text> <urn_litho_1>urn:cgi:classifier:CGI:SimpleLithology:2008:sand</urn_litho_1> <urn_litho_2> urn:cgi:classifier:CGI:SimpleLithology:2008:non_clastic_siliceous_sedimentary_rock </urn_litho_2> </onege_wms_feature>
Second Step: Implement the GeoSciML schema The objective is to generate the GeoSciML schema:
Second Step: Implement the GeoSciML schema Example http://onegeology-europe.brgm.fr/demoServices/index.jsp There does not exist any WMS or WFS software implementing GeoSciML. It is necessary to add a component front of the WMS/WFS to handle/generate GeoSciML.
What a GeoSciML Web Map/Feature Service is? • WMS (View service) • Metadata (GetCapabilities): Usual WMS GetCapabilities • View (GetMap): • If using external SLD, for example user-defined SLD for “query and view” applications, or using harmonized external SLD: SLD is expressed with GeoSciML path (instead of GML path). • Get the Data (GetFeatureInfo): if requested in XML, should be delivered in GeoSciML. • WFS (Query and use/download service) • Metadata (GetCapabilities): Usual WFS GetCapabilities • Get the Data (GetFeature): if requested in XML, should be delivered in GeoSciML. • If using query (filter), the query is expressed with GeoSciML path (instead of GML path).
What are the steps for implementing GeoSciML service? Second Step: Implement the GeoSciML schema • WMS (View service) Metadata (GetCapabilities): Usual WMS GetCapabilities • In the GetCapabilities, the outputFormat for the GetFeatureInfo must include “text/xml”. • Nothing else.
What are the steps for implementing GeoSciML service? Second Step: Implement the GeoSciML schema • WMS (View service) View (GetMap): • If using external SLD, for example user-defined SLD for “query and view” applications, or using harmonized external SLD: • SLD is expressed with GeoSciML path (instead of GML path). Example: http://onegeology-europe.brgm.fr/demoServices/index.jsp The GeoSciML Component must: • Handle an external SLD • Transform the SLD with GeoSciML path into a SLD expressed using local paths
GeoSciML SLD Example GML OGC filter used in the SLD to query and view the dataset <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>urn_litho_1</ogc:PropertyName> <ogc:Literal>urn:cgi:classifier:CGI:SimpleLithology:2008:sand</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> The same OGC filter expressed in GeoSciML <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>gsml:composition/gsml:CompositionPart/gsml:lithology@xlink:href</ogc:PropertyName> <ogc:Literal>urn:cgi:classifier:CGI:SimpleLithology:2008:sand</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter>
What are the steps for implementing GeoSciML service? Second Step: Implement the GeoSciML schema • WMS (View service) Get the Data (GetFeatureInfo): if requested in XML, should be delivered in GeoSciML. Example: http://onegeology-europe.brgm.fr/demoServices/index.jsp The GeoSciML Component must: • Read the GML generated by the OGC WMS server • Transform it into GeoSciML
What are the steps for implementing GeoSciML service? Second Step: Implement the GeoSciML schema • WFS (Query and use/download service) Metadata (GetCapabilities): Usual WFS GetCapabilities • In the GetCapabilities, the outputFormat for the GetFeature must include “text/xml; subtype=geosciml/2.0”. • Nothing else.
What are the steps for implementing GeoSciML service? Second Step: Implement the GeoSciML schema • WFS (Query and use/download service) Get the Data (GetFeature): if requested in XML, should be delivered in GeoSciML. • If using query (filter), the query is expressed with GeoSciML path (instead of GML path). The GeoSciML Component must: • Handle the query expressed in GeoSciML • Transform it (replacing GeoSciML path by local path) • Transfert the query to the OGC WFS server, then read the GML generated • Transform it into GeoSciML
For client applications, what utilisation of GeoSciML? • Example of OneGeology-Europe project
For client applications, what utilisation of GeoSciML? Interesting functionalities on such harmonized datasets: • Query and view: • Using external SLD and getMap requests to query datasets • Query and print / download: • Using query and WFS to query then print or download the features • Multilingualism: • Data content: the getFeatureInfo or GetFeature response is expressed in GeoSciML. Using GeoSciML vocabularies (where each Concept is translated), the terms used can be translated by the client application. • Legend: in the case of a legend based on a SLD known by the client application, this application is able to display a legend translated (same process as translation of GetFeatureInfo or GetFeature).
Conclusion • GeoSciML WFS, with some filters allowed in the query: • Already implemented in GeoSciML testbed • GeoSciML WFS, • already implemented by several OneGeology Global WFS To be implemented and used into OneGeology Europe project