I am the technical lead of GA’s effort to adopt GeodesyML. I see that you’ve solved your problem by upgrading to a later version of GeoServer. I would like to suggest a slightly different approach to your mapping and share with you our own implementation of a GeodesyML web feature service, which you may find helpful.
Our interpretation is that GeodesyML
root element exists for use outside of the OGC/WFS context. Parties may wish to exchange GodesyML documents, by means other than WFS, containing multiple entities, as in the following example:
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/examples/MOBS.xml.
For your WFS service, perhaps you could consider defining a feature type called SiteLog
to generate responses of the form:
<wfs:member>
<geo:SiteLog>
<geo:siteIdentification>
<geo:fourCharacterId>…</geo:fourCharacterId>
<geo:siteName>…</geo:siteName>
…
</geo:siteIdentification>
</geo:SiteLog>
…
</wfs:member>
Web feature services can return any XML type that is a subtype of GML AbstractFeatureType
. This approach would allow you to implement multiple GeodesyML WFS services returning different feature types like geo:SiteLog
, geo:Site
, geo:Setup
, geo:Node
, which are all top-level entities, in the sense that they are all subtypes of GML AbstractFeatureType
. Otherwise, I don’t know how would clients of a single feature type called geo:GeodesyML
specify what information they are interested in. SiteLog
is just one entity type modelled by GeodesyML.
Here is a link to the data directory of a GeoServer 2.9.1 instance at Geoscience Australia that implements WFS feature type geo:Site
:
https://github.com/GeoscienceAustralia/Geodesy-Web-Services/tree/next/gws-geoserver/data
This service drives the search screen for our GNSS Site Manager web application, which is currently in development.
Here is a sample query:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" service="WFS" version="2.0.0">
<wfs:Query typeNames="geo:Site">
<fes:Or>
<fes:PropertyIsEqualTo>
<fes:Literal>true</fes:Literal>
<fes:Function name="isLike">
<fes:ValueReference>gml:identifier</fes:ValueReference>
<fes:Literal>(?i)ad.*</fes:Literal>
</fes:Function>
</fes:PropertyIsEqualTo>
<fes:PropertyIsEqualTo>
<fes:Literal>true</fes:Literal>
<fes:Function name="isLike">
<fes:ValueReference>gml:name</fes:ValueReference>
<fes:Literal>(?i).*ad.*</fes:Literal>
</fes:Function>
</fes:PropertyIsEqualTo>
</fes:Or>
<fes:SortBy>
<fes:SortProperty>
<fes:ValueReference>gml:identifier</fes:ValueReference>
</fes:SortProperty>
</fes:SortBy>
</wfs:Query>
</wfs:GetFeature>
and the response:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:geo="urn:xml-gov-au:icsm:egeodesy:0.4" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" numberMatched="unknown" numberReturned="4" timeStamp="2017-06-21T23:01:54.436Z" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://testgeodesy-geoserver.geodesy.ga.gov.au:80/geoserver/schemas/wfs/2.0/wfs.xsd urn:xml-gov-au:icsm:egeodesy:0.4 http://schemas.ga.gov.au/geodesyml/0.4/geodesyML.xsd http://www.opengis.net/gml/3.2 http://testgeodesy-geoserver.geodesy.ga.gov.au:80/geoserver/schemas/gml/3.2.1/gml.xsd">
<wfs:member>
<geo:Site gml:id="Site.852">
<gml:identifier codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteIdentifier">ADE1</gml:identifier>
<gml:name codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteName">Australia NGA collocated</gml:name>
<geo:type codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteType">CORS</geo:type>
</geo:Site>
</wfs:member>
<wfs:member>
<geo:Site gml:id="Site.895">
<gml:identifier codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteIdentifier">QUI3</gml:identifier>
<gml:name codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteName">Ecuador NGA colocated</gml:name>
<geo:type codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteType">CORS</geo:type>
</geo:Site>
</wfs:member>
<wfs:member>
<geo:Site gml:id="Site.878">
<gml:identifier codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteIdentifier">QUI4</gml:identifier>
<gml:name codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteName">Ecuador NGA colocated</gml:name>
<geo:type codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteType">CORS</geo:type>
</geo:Site>
</wfs:member>
<wfs:member>
<geo:Site gml:id="Site.861">
<gml:identifier codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteIdentifier">WSRT</gml:identifier>
<gml:name codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteName">Westerbork Synthesis Radio Telescope</gml:name>
<geo:type codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4:SiteType">CORS</geo:type>
</geo:Site>
</wfs:member>
</wfs:FeatureCollection>
I know that this does not directly answer your question, but instead proposes a slightly different approach, which may side-step your current problem and also be a better way forward. Please let me know what you think.
Regards,
Lazar Bodor
Software Development & Support Section
ICT Innovation and Services | GEOSCIENCE AUSTRALIA
Phone: +61 2 6249 9273 Fax: +61 2 6249 9999
Email: [email protected] Web: www.ga.gov.au
Cnr Jerrabomberra Avenue and Hindmarsh Drive Symonston ACT
GPO Box 378 Canberra ACT 2601 Australia
Applying geoscience to Australia’s most important challenges