geoserver application-schema
TRANSCRIPT
ign.fr
GEOSERVER APPLICATION-SCHEMA
A NECESSARY PLUGIN FOR INSPIRE COMPLIANCY
TCN/13.168
[email protected] 2013
Geoserver
�Open-source server software
�Provides WMS, WFS and WCS
�Used at IGN-F
�WMS INSPIRE compliant
�WFS unable to provide INSPIRE-compliant data
Status in 2011
08/10/2013TCN/13.168 3/14
AN EXTENSION
�One of the extensions available
�Current version 2.3.5
�Not sufficient to provide
INSPIRE-compliant data
Status in 2011
2012Developments financed
by IGN-F to make
Geoserver INSPIRE
compliant
08/10/2013TCN/13.168 5/14
EXAMPLE OF AN ADMINISTRATIVE UNIT
Goal : Go from a
relational (pseudo-
INSPIRE) database to an
INSPIRE-compliant GML
08/10/2013TCN/13.168 6/14
PRINCIPLE
Simple feature
datastore
TABLE
geographicalname
TABLE
administrativeunit
Simple features
FEATURE
ns:administrativeunit
FEATURE
ns:geographicalname
Complex
features
FEATURE
au:AdministrativeUnit
with<au:AdministrativeUnit>
<au:name>
<gn:GeographicalName>…
Only possible with
application schema
No dataTypes, no links With dataTypes and links
08/10/2013TCN/13.168 7/14
SPECIFIC CONFIGURATION FOR APPLICATION
SCHEMA
DATA_DIRECTORYworkspaces
auau_AdministrativeUnits
datastore.xmlmappingfile.xmlFeatureType
feature.xmllayer.xml
Link to the
database
Definition of
the feature
Definition of
the layer
08/10/2013TCN/13.168 9/14
mapping.xml : Simple case
<FeatureTypeMapping>
<sourceDataStore>ign_postgis_datastore</sourceDataStore>
<sourceType>administrativeunit</sourceType>
<targetElement>au:AdministrativeUnit</targetElement>
<AttributeMapping>
<targetAttribute>au:nationalLevel</targetAttribute>
<sourceExpression>
<OCQL>nationallevel</OCQL>
</sourceExpression>
</AttributeMapping>
Mapping between source and target features
Simple attribute mapping
08/10/2013TCN/13.168 10/14
mapping.xml: datatype example
<AttributeMapping>
<targetAttribute>au:nationalLevelName/gmd:LocalisedCharacterString</target
Attribute>
<sourceExpression>
<OCQL>nationallevelname</OCQL>
</sourceExpression>
<ClientProperty>
<name>locale</name>
<value>'#FR'</value>
</ClientProperty>
</AttributeMapping>
More complex mappings
<au:nationalLevelName>
<gmd:LocalisedCharacterstring locale=‘#FR’>
commune
</gmd:LocalisedCharacterstring>
</au:nationalLevelName>
« commune » map
08/10/2013TCN/13.168 11/14
mapping.xml: voidable attribute example
<AttributeMapping>
<targetAttribute>au:beginLifeSpanVersion</targetAttribute>
<sourceExpression>
<OCQL>beginLifeSpanVersion</OCQL>
</sourceExpression>
<ClientProperty>
<name>nilReason</name>
<value>if_then_else(isNull(beginlifespanversion), 'unpopulated',
Expression.NIL)</value>
</ClientProperty>
<ClientProperty>
<name>xsi:nil</name>
<value>if_then_else(isNull(beginlifespanversion), 'true',
Expression.NIL)</value>
</ClientProperty>
</AttributeMapping>
NilReasonAttribute issue
<au:beginLifeSpanVersion xsi:nil="true" nilReason=“unpopulated"/>
Test if the attribute is null or not. If yes, nilReason attributeis added.
08/10/2013TCN/13.168 12/14
<AttributeMapping>
<targetAttribute>au:upperLevelUnit</targetAttribute>
<encodeIfEmpty>true</encodeIfEmpty>
<sourceExpression>
<OCQL>strTrim(upperlevelunit)</OCQL>
<linkElement>au:AdministrativeUnit</linkElement>
<linkField>au:inspireId/base:Identifier/base:localId</linkField>
</sourceExpression>
<isMultiple>true</isMultiple>
<ClientProperty>
<name>xlink:href</name>
<value>
strConcat('urn:xinspire:specification:gmlas:AdministrativeUnit:3.0:',
strTrim(inspireid))
</value>
</ClientProperty>
</AttributeMapping>
mapping.xml: Association example
Chaining references or complexTypes
Administrative
Unit
+ upperLevelUnit
08/10/2013TCN/13.168 13/14