AN ORGANISATION FOR A NATIONAL EARTH SCIENCE INFRASTRUCTURE PROGRAM Ben Caradoc-Davies <[email protected]> CSIRO Earth Science and Resource Engineering Free and Open Source Software for Geospatial Sydney, Australia, 20-23 October 2009 GeoServer application schema support: complex features for the masses
21
Embed
AN ORGANISATION FOR A NATIONAL EARTH SCIENCE INFRASTRUCTURE PROGRAM Ben Caradoc-Davies CSIRO Earth Science and Resource Engineering Free and Open Source.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
AN ORGANISATION FOR A NATIONAL EARTH SCIENCE INFRASTRUCTURE PROGRAM
Ben Caradoc-Davies <[email protected]>CSIRO Earth Science and Resource Engineering
Free and Open Source Software for GeospatialSydney, Australia, 20-23 October 2009
GeoServer application schema support: complex features for the masses
GeoServer
Java servlet for OGC Web Services WMS, WFS, WFS-T, ... Open Source (GPL) Built on GeoTools (LGPL) Reference OGC Web Feature Service
implementation Originally supported only simple features app-schema adds complex feature WFS (only)
Simple Feature
Flat XML representation of one database table
Simple Feature
Type autogenerated by GeoServer All properties in one namespace
Database schema exposed to consumer Meaning implied by element names Semantics often have to be inferred by user
Simple features: Represent database table as XML Interoperability through simplicity
Complex features: GML application schema defines complex types Represent object relationships Polymorphism, aggregation, inheritance Extensible information model Scales to large problems and communities
GML Application Schema Examples
GeoSciML: a GML application schema for the exchange of geoscience data
Three Australian jurisdictions: Victoria (GSV) – deegree Tasmania (MRT) – GeoServer app-schema South Australia (PIRSA) – GeoServer app-schema
(hosted by CSIRO) EarthResourceML (derived from GeoSciML) Interoperability through complex feature types
defined in a GML application schema Community-agreed information standard
http://portal.auscope.org/
History of GeoServer app-schema
2005-2007: GeoServer community-schemas Rob Atkinson, Gabriel Roldán Geochemistry roadshow (CSIRO) Fork of a branch (not dead, just sleeping) Informed GeoAPI and GeoTools development
2008: ported to trunk by AuScope Renamed Geoserver app-schema
Now: plugin for GeoServer 2.0-beta2 and later
How app-schema works
Built on GeoTools data stores Maps simple features into complex features Works both ways, so supports queries
Installation and Configuration
app-schema plugin for vanilla GeoServer Can coexist with simple feature types
Configure by hand-editing XML mapping files Driven by GML application schema
Define schema URL in mapping file Feature chaining:
Define feature types separately and use as properties of each other
Mapping File
Defines mappings: From: column in database To: XPath in encoded XML
Use CQL expressions Set XML attributes<AttributeMapping> <targetAttribute>gsml:observationMethod/gsml:CGI_TermValue/gsml:value</targetAttribute> <sourceExpression> <OCQL>OBSERVATION_METHOD</OCQL> </sourceExpression> <ClientProperty> <name>codeSpace</name> <value>OBSERVATION_METHOD_CODESPACE</value> </ClientProperty></AttributeMapping>
Feature Chaining
Define feature types separately Use features as properties of each other Simplifies configuration Equivalent to a foreign key reference
No XSLT programming Configurable through straightforward mapping Uses existing GeoTools/GeoServer
components JDBC data sources: PostGIS, Oracle, ArcSDE Shapefiles, property files Good performance Strong developer community and user base
Aids adoption of GML application schemas
Weaknesses
No XSLT programming No data-driven polymorphism
Type of each property fixed at mapping time No configuration web interface
Hand-edit XML files Tedious and error-prone Requires knowledge of application schema Requires understanding of GML encoding rules
Future Work
Support for data-driven polymorphism Configuration web interface
Aid navigation of GML application schema
Conclusion
Complex feature types: Defined in a GML application schema Represent object relationships Extensible information model Community-agreed information standard
GeoServer app-schema plugin: Reuses existing community-supported components Configured with XML mapping files Maps simple features into complex features
Resources
GeoServer User Manual: Application Schema Support http://docs.geoserver.org/trunk/en/user/data/app-schema/
Rini Angreani, co-maintainer of app-schema and author of app-schema feature chaining.
Rob Atkinson, Gabriel Roldán, Jody Garnett, Justin Deoliveira, and the rest of the GeoTools and GeoServer communities.
Simon Cox, and the rest of the GeoSciML community. CSIRO is Australia's national science agency. AuScope Ltd is funded under the National Collaborative
Research Infrastructure Strategy (NCRIS), an Australian Commonwealth Government Programme.