Discussion:
[Geoserver-users] App-Schema Mapping File to GeodesyML
medley
2017-06-15 22:53:23 UTC
Permalink
Hi,

I am trying to have a Geoserver display GML its output in the GeodesyML
schema, outlined here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/> . In
particular, I am working with GPS monument meta data. For now I'm trying to
just output the siteName in GeodesyML schema when I click GML in the Layers
Preview in Geoserver. The relevant XML schema definition file for GeodesyML
is called monumentInfo.xsd. Unfortunately, I can't seem to get the mapping
correct from my database schema to GeodesyML. In particular I think the
problem is in the <targetElement> or <targetAttribute> fields within
<FeatureTypeMapping>. I concluded that I should use geo:GeodesyML as the
argument to schemaUri because it is the only xsd file with a top level
element (type GeodesyMLType).

How can I use the schema outlined in the monumentInfo.xsd schema definition?
Specifically here, how can I map site_name in my database schema to siteName
in the GeodesyML schema?

Any help is sincerely appreciated and I apologize if my lack of familiarity
with XML is causing me to ask a silly question. I have done a fair bit of
Google research. The tutorial I followed to get this far is here
<http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html> ,
with supporting documentation here
<http://docs.geoserver.org/stable/en/user/data/app-schema/mapping-file.html>
but they are using GeoscienceML, not GeodesyML.

-Gavin Medley


*The view I am querying, called geoml_monuments contains:*
id | station_code | site_name | geolocation | iers_domex | country_name
I am pretty sure this is fine.



*The monumentsInfo.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/monumentInfo.xsd
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/monumentInfo.xsd>



*The GeodesyML.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/geodesyML.xsd
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/geodesyML.xsd>




*My mapping file:*



<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess
xmlns:as="http://www.geotools.org/app-schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.geotools.org/app-schema
AppSchemaDataAccess.xsd">
<namespaces>
<Namespace>
<prefix>geo</prefix>
<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
</Namespace>
<Namespace>
<prefix>gml</prefix>
<uri>http://www.opengis.net/gml/3.2</uri>
</Namespace>
<Namespace>
<prefix>gmd</prefix>
<uri>http://www.isotc211.org/2005/gmd</uri>
</Namespace>
</namespaces>
<includedTypes></includedTypes>
<sourceDataStores>
<DataStore>
<id>thedb</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgisng</value>
</Parameter>
<Parameter>
<name>host</name>
<value>thedatabaselocation.unavco.org</value>
</Parameter>
<Parameter>
<name>port</name>
<value>5432</value>
</Parameter>
<Parameter>
<name>database</name>
<value>tst3</value>
</Parameter>
<Parameter>
<name>user</name>
<value>theuser</value>
</Parameter>
<Parameter>
<name>passwd</name>
<value>thepassword</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<catalog></catalog>
<targetTypes>
<FeatureType>
<schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>thedb</sourceDataStore>
<sourceType>geoml_monuments</sourceType>

<targetElement>geo:GeodesyML</targetElement>

<attributeMappings>
<AttributeMapping>


<targetAttribute>geo:siteIdentificationType/geo:siteName</targetAttribute>
<sourceExpression><OCQL>site_name</OCQL></sourceExpression>
</AttributeMapping>

</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>




*The output upon clicking GML from Layer Preview:*

<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
java.lang.RuntimeException: Error applying mapping with targetAttribute
geo:siteIdentificationType/geo:siteName Error applying mapping with
targetAttribute geo:siteIdentificationType/geo:siteName
geo:siteIdentificationType is not a valid location path for type
urn:xml-gov-au:icsm:egeodesy:0.4:GeodesyMLType. geo:siteIdentificationType
ns: urn:xml-gov-au:icsm:egeodesy:0.4, GeodesyMLType properties:
http://www.opengis.net/gml/3.2#metaDataProperty,
http://www.opengis.net/gml/3.2#description,
http://www.opengis.net/gml/3.2#descriptionReference,
http://www.opengis.net/gml/3.2#identifier,
http://www.opengis.net/gml/3.2#name,
http://www.opengis.net/gml/3.2#boundedBy,
http://www.opengis.net/gml/3.2#location,
http://www.opengis.net/gml/3.2#validTime,
urn:xml-gov-au:icsm:egeodesy:0.4#Node,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPosition,
urn:xml-gov-au:icsm:egeodesy:0.4#PositionPairCovariance,
urn:xml-gov-au:icsm:egeodesy:0.4#Site,
urn:xml-gov-au:icsm:egeodesy:0.4#siteVisit,
urn:xml-gov-au:icsm:egeodesy:0.4#Monument,
urn:xml-gov-au:icsm:egeodesy:0.4#SupplementaryMark,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurement,
urn:xml-gov-au:icsm:egeodesy:0.4#Instrument,
urn:xml-gov-au:icsm:egeodesy:0.4#Sensor,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionEstimator,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractSiteLog,
urn:xml-gov-au:icsm:egeodesy:0.4#Project,
urn:xml-gov-au:icsm:egeodesy:0.4#Document,
urn:xml-gov-au:icsm:egeodesy:0.4#Setup,
urn:xml-gov-au:icsm:egeodesy:0.4#TerrestrialReferenceFrame,
urn:xml-gov-au:icsm:egeodesy:0.4#DynamicTransformation,
http://www.opengis.net/gml/3.2#AbstractCRS, null#FEATURE_LINK,
null#FEATURE_LINK
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Ben Caradoc-Davies
2017-06-18 03:32:46 UTC
Permalink
Gavin,

it looks to me like GeodesyML is a GML 3.2.1 application schema:
https://github.com/GeoscienceAustralia/GeodesyML/

This means that it will only work with GML 3.2 output from GeoServer.
Either select a GML 3.2 output format, use WFS 2.0 (which defaults to
GML 3.2), or manually add outputformat=gml32 to a WFS 1.1 request.

You will likely also have to define secondary namespaces:
http://docs.geoserver.org/latest/en/user/data/app-schema/supported-gml-versions.html
http://docs.geoserver.org/latest/en/user/data/app-schema/secondary-namespaces.html

schemaUri must be a URL. You can have multiple elements. The top-level
one might be this, but I do not know if it includes monumentInfo.xsd:
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/geodesyML.xsd

app-schema will cache it for you. Use a better URL if you have one (e.g.
from geodesyml.org).

I do not know GeodesyML and do not know what type you should choose.
Perhaps geo:Site? This is the thing that goes on targetElement.

Where is the siteName you mentioned? Could you use the gml:name
inherited from gml:AbstractFeatureType? The property name goes in
targetAttribute.

Deciding how to map your database to the XML schema is, according to
reports, 2/3 of the work.

Kind regards,
Ben.
Post by medley
Hi,
I am trying to have a Geoserver display GML its output in the GeodesyML
schema, outlined here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/> . In
particular, I am working with GPS monument meta data. For now I'm trying to
just output the siteName in GeodesyML schema when I click GML in the Layers
Preview in Geoserver. The relevant XML schema definition file for GeodesyML
is called monumentInfo.xsd. Unfortunately, I can't seem to get the mapping
correct from my database schema to GeodesyML. In particular I think the
problem is in the <targetElement> or <targetAttribute> fields within
<FeatureTypeMapping>. I concluded that I should use geo:GeodesyML as the
argument to schemaUri because it is the only xsd file with a top level
element (type GeodesyMLType).
How can I use the schema outlined in the monumentInfo.xsd schema definition?
Specifically here, how can I map site_name in my database schema to siteName
in the GeodesyML schema?
Any help is sincerely appreciated and I apologize if my lack of familiarity
with XML is causing me to ask a silly question. I have done a fair bit of
Google research. The tutorial I followed to get this far is here
<http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html> ,
with supporting documentation here
<http://docs.geoserver.org/stable/en/user/data/app-schema/mapping-file.html>
but they are using GeoscienceML, not GeodesyML.
-Gavin Medley
*The view I am querying, called geoml_monuments contains:*
id | station_code | site_name | geolocation | iers_domex | country_name
I am pretty sure this is fine.
*The monumentsInfo.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/monumentInfo.xsd
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/monumentInfo.xsd>
*The GeodesyML.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/geodesyML.xsd
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/geodesyML.xsd>
*My mapping file:*
<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess
xmlns:as="http://www.geotools.org/app-schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.geotools.org/app-schema
AppSchemaDataAccess.xsd">
<namespaces>
<Namespace>
<prefix>geo</prefix>
<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
</Namespace>
<Namespace>
<prefix>gml</prefix>
<uri>http://www.opengis.net/gml/3.2</uri>
</Namespace>
<Namespace>
<prefix>gmd</prefix>
<uri>http://www.isotc211.org/2005/gmd</uri>
</Namespace>
</namespaces>
<includedTypes></includedTypes>
<sourceDataStores>
<DataStore>
<id>thedb</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgisng</value>
</Parameter>
<Parameter>
<name>host</name>
<value>thedatabaselocation.unavco.org</value>
</Parameter>
<Parameter>
<name>port</name>
<value>5432</value>
</Parameter>
<Parameter>
<name>database</name>
<value>tst3</value>
</Parameter>
<Parameter>
<name>user</name>
<value>theuser</value>
</Parameter>
<Parameter>
<name>passwd</name>
<value>thepassword</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<catalog></catalog>
<targetTypes>
<FeatureType>
<schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>thedb</sourceDataStore>
<sourceType>geoml_monuments</sourceType>
<targetElement>geo:GeodesyML</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>geo:siteIdentificationType/geo:siteName</targetAttribute>
<sourceExpression><OCQL>site_name</OCQL></sourceExpression>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
*The output upon clicking GML from Layer Preview:*
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
java.lang.RuntimeException: Error applying mapping with targetAttribute
geo:siteIdentificationType/geo:siteName Error applying mapping with
targetAttribute geo:siteIdentificationType/geo:siteName
geo:siteIdentificationType is not a valid location path for type
urn:xml-gov-au:icsm:egeodesy:0.4:GeodesyMLType. geo:siteIdentificationType
http://www.opengis.net/gml/3.2#metaDataProperty,
http://www.opengis.net/gml/3.2#description,
http://www.opengis.net/gml/3.2#descriptionReference,
http://www.opengis.net/gml/3.2#identifier,
http://www.opengis.net/gml/3.2#name,
http://www.opengis.net/gml/3.2#boundedBy,
http://www.opengis.net/gml/3.2#location,
http://www.opengis.net/gml/3.2#validTime,
urn:xml-gov-au:icsm:egeodesy:0.4#Node,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPosition,
urn:xml-gov-au:icsm:egeodesy:0.4#PositionPairCovariance,
urn:xml-gov-au:icsm:egeodesy:0.4#Site,
urn:xml-gov-au:icsm:egeodesy:0.4#siteVisit,
urn:xml-gov-au:icsm:egeodesy:0.4#Monument,
urn:xml-gov-au:icsm:egeodesy:0.4#SupplementaryMark,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurement,
urn:xml-gov-au:icsm:egeodesy:0.4#Instrument,
urn:xml-gov-au:icsm:egeodesy:0.4#Sensor,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionEstimator,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractSiteLog,
urn:xml-gov-au:icsm:egeodesy:0.4#Project,
urn:xml-gov-au:icsm:egeodesy:0.4#Document,
urn:xml-gov-au:icsm:egeodesy:0.4#Setup,
urn:xml-gov-au:icsm:egeodesy:0.4#TerrestrialReferenceFrame,
urn:xml-gov-au:icsm:egeodesy:0.4#DynamicTransformation,
http://www.opengis.net/gml/3.2#AbstractCRS, null#FEATURE_LINK,
null#FEATURE_LINK
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
medley
2017-06-19 22:21:22 UTC
Permalink
Hi Ben,

Thanks for your response! From what I can tell, the community as a whole is
pretty new to GeodesyML. I followed your advice and definitely made
progress but I do have some followup questions.

1) Here is the request I am using, it specifies WFS version 1.1.0 and GML
version 3.2:
http://localhost:8080/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=gps_as:GeodesyML&outputFormat=gml32&maxFeatures=50
2) I created the secondary namespace as suggested and ensured that the gml
namespace matches between the namespace.xml file, the GeodesyML schema, and
my mapping file (http://www.opengis.net/gml/3.2).
3) I replaced the locally hosted .xsd reference in <schemaUri> with:
https://raw.githubusercontent.com/GeoscienceAustralia/GeodesyML/master/schemas/geodesyML.xsd
(I can't find a better source for it, the schema may still be under active
development?).

Now the new stuff. Upon some further reading into how XML schemas work (yay
wikibooks!) I discovered that my XPath expression for <targetAttribute> was
totally incorrect. I've included a mapping file snippet below, showing the
<targetTypes> block and the <typeMappings> block of my fixed mapping file.
This change stopped the generation of errors upon performing a WFS request.
Unfortunately, I still don't see the mapped features in the output.
Instead, I seem to get ONLY the gml:id out. I included an example of the
WFS request output below, requesting only 5 results. What really puzzles me
is that I specified <encodeIfEmpty>true</encodeIfEmpty> in the
<AttributeMapping> for site_name and station_code so I would expect to at
least see the fields. What's going on here?

Thanks for your help,

Gavin

*WFS Request Example Output:*
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:gps_as="
urn:xml-gov-au:icsm:egeodesy:0.4" xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:gps="http://geoserver.org/gps" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" numberMatched="unknown"
numberReturned="5" timeStamp="2017-06-19T22:12:57.234Z" xsi:schemaLocation="
http://www.opengis.net/wfs/2.0
http://localhost:8080/geoserver/schemas/wfs/2.0/wfs.xsd
urn:xml-gov-au:icsm:egeodesy:0.4
https://raw.githubusercontent.com/GeoscienceAustralia/GeodesyML/master/schemas/geodesyML.xsd
http://www.opengis.net/gml/3.2
http://localhost:8080/geoserver/schemas/gml/3.2.1/gml.xsd">
<wfs:member>
<gps_as:GeodesyML gml:id="geoml_monuments.fid-23c2aebd_15cc2138381_-7f65"/>
</wfs:member>
<wfs:member>
<gps_as:GeodesyML gml:id="geoml_monuments.fid-23c2aebd_15cc2138381_-7f64"/>
</wfs:member>
<wfs:member>
<gps_as:GeodesyML gml:id="geoml_monuments.fid-23c2aebd_15cc2138381_-7f63"/>
</wfs:member>
<wfs:member>
<gps_as:GeodesyML gml:id="geoml_monuments.fid-23c2aebd_15cc2138381_-7f62"/>
</wfs:member>
<wfs:member>
<gps_as:GeodesyML gml:id="geoml_monuments.fid-23c2aebd_15cc2138381_-7f61"/>
</wfs:member>
</wfs:FeatureCollection>

*Mapping File Snippet:*
<targetTypes>
<FeatureType>
<!--<schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd
</schemaUri>-->
<schemaUri>
https://raw.githubusercontent.com/GeoscienceAustralia/GeodesyML/master/schemas/geodesyML.xsd
</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>thedb</sourceDataStore>
<sourceType>geoml_monuments</sourceType>
<!-- geoml_monuments is a materialized view in the postGIS database and it
is used as the source schema, or the schema we are mapping FROM -->
<targetElement>geo:GeodesyML</targetElement>
<!-- is the root element of the target schema, GeodesyML -->
<attributeMappings>
<AttributeMapping>
<targetAttribute>geo:siteLog/geo:siteIdentification/geo:siteName</targetAttribute>
<sourceExpression><OCQL>site_name</OCQL></sourceExpression>
<encodeIfEmpty>true</encodeIfEmpty>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>geo:siteLog/geo:siteIdentification/geo:fourCharacterID</targetAttribute>
<sourceExpression><OCQL>station_code</OCQL></sourceExpression>
<encodeIfEmpty>true</encodeIfEmpty>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>




On Sat, Jun 17, 2017 at 9:34 PM, Ben Caradoc-Davies-2 [via OSGeo.org] <
Post by Ben Caradoc-Davies
Gavin,
https://github.com/GeoscienceAustralia/GeodesyML/
This means that it will only work with GML 3.2 output from GeoServer.
Either select a GML 3.2 output format, use WFS 2.0 (which defaults to
GML 3.2), or manually add outputformat=gml32 to a WFS 1.1 request.
http://docs.geoserver.org/latest/en/user/data/app-
schema/supported-gml-versions.html
http://docs.geoserver.org/latest/en/user/data/app-
schema/secondary-namespaces.html
schemaUri must be a URL. You can have multiple elements. The top-level
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
app-schema will cache it for you. Use a better URL if you have one (e.g.
from geodesyml.org).
I do not know GeodesyML and do not know what type you should choose.
Perhaps geo:Site? This is the thing that goes on targetElement.
Where is the siteName you mentioned? Could you use the gml:name
inherited from gml:AbstractFeatureType? The property name goes in
targetAttribute.
Deciding how to map your database to the XML schema is, according to
reports, 2/3 of the work.
Kind regards,
Ben.
Post by medley
Hi,
I am trying to have a Geoserver display GML its output in the GeodesyML
schema, outlined here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/> . In
particular, I am working with GPS monument meta data. For now I'm trying
to
Post by medley
just output the siteName in GeodesyML schema when I click GML in the
Layers
Post by medley
Preview in Geoserver. The relevant XML schema definition file for
GeodesyML
Post by medley
is called monumentInfo.xsd. Unfortunately, I can't seem to get the
mapping
Post by medley
correct from my database schema to GeodesyML. In particular I think the
problem is in the <targetElement> or <targetAttribute> fields within
<FeatureTypeMapping>. I concluded that I should use geo:GeodesyML as the
argument to schemaUri because it is the only xsd file with a top level
element (type GeodesyMLType).
How can I use the schema outlined in the monumentInfo.xsd schema
definition?
Post by medley
Specifically here, how can I map site_name in my database schema to
siteName
Post by medley
in the GeodesyML schema?
Any help is sincerely appreciated and I apologize if my lack of
familiarity
Post by medley
with XML is causing me to ask a silly question. I have done a fair bit
of
Post by medley
Google research. The tutorial I followed to get this far is here
<http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html>
,
Post by medley
with supporting documentation here
<http://docs.geoserver.org/stable/en/user/data/app-
schema/mapping-file.html>
Post by medley
but they are using GeoscienceML, not GeodesyML.
-Gavin Medley
*The view I am querying, called geoml_monuments contains:*
id | station_code | site_name | geolocation | iers_domex | country_name
I am pretty sure this is fine.
*The monumentsInfo.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd>
Post by medley
*The GeodesyML.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd>
Post by medley
*My mapping file:*
<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess
xmlns:as="http://www.geotools.org/app-schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.geotools.org/app-schema
AppSchemaDataAccess.xsd">
<namespaces>
<Namespace>
<prefix>geo</prefix>
<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
</Namespace>
<Namespace>
<prefix>gml</prefix>
<uri>http://www.opengis.net/gml/3.2</uri>
</Namespace>
<Namespace>
<prefix>gmd</prefix>
<uri>http://www.isotc211.org/2005/gmd</uri>
</Namespace>
</namespaces>
<includedTypes></includedTypes>
<sourceDataStores>
<DataStore>
<id>thedb</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgisng</value>
</Parameter>
<Parameter>
<name>host</name>
<value>thedatabaselocation.unavco.org</value>
</Parameter>
<Parameter>
<name>port</name>
<value>5432</value>
</Parameter>
<Parameter>
<name>database</name>
<value>tst3</value>
</Parameter>
<Parameter>
<name>user</name>
<value>theuser</value>
</Parameter>
<Parameter>
<name>passwd</name>
<value>thepassword</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<catalog></catalog>
<targetTypes>
<FeatureType>
<schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>thedb</sourceDataStore>
<sourceType>geoml_monuments</sourceType>
<targetElement>geo:GeodesyML</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>geo:siteIdentificationType/geo:siteName</targetAttribute>
<sourceExpression><OCQL>site_name</OCQL></sourceExpression>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
*The output upon clicking GML from Layer Preview:*
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
java.lang.RuntimeException: Error applying mapping with targetAttribute
geo:siteIdentificationType/geo:siteName Error applying mapping with
targetAttribute geo:siteIdentificationType/geo:siteName
geo:siteIdentificationType is not a valid location path for type
urn:xml-gov-au:icsm:egeodesy:0.4:GeodesyMLType.
geo:siteIdentificationType
Post by medley
http://www.opengis.net/gml/3.2#metaDataProperty,
http://www.opengis.net/gml/3.2#description,
http://www.opengis.net/gml/3.2#descriptionReference,
http://www.opengis.net/gml/3.2#identifier,
http://www.opengis.net/gml/3.2#name,
http://www.opengis.net/gml/3.2#boundedBy,
http://www.opengis.net/gml/3.2#location,
http://www.opengis.net/gml/3.2#validTime,
urn:xml-gov-au:icsm:egeodesy:0.4#Node,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPosition,
urn:xml-gov-au:icsm:egeodesy:0.4#PositionPairCovariance,
urn:xml-gov-au:icsm:egeodesy:0.4#Site,
urn:xml-gov-au:icsm:egeodesy:0.4#siteVisit,
urn:xml-gov-au:icsm:egeodesy:0.4#Monument,
urn:xml-gov-au:icsm:egeodesy:0.4#SupplementaryMark,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurement,
urn:xml-gov-au:icsm:egeodesy:0.4#Instrument,
urn:xml-gov-au:icsm:egeodesy:0.4#Sensor,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionEstimator,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractSiteLog,
urn:xml-gov-au:icsm:egeodesy:0.4#Project,
urn:xml-gov-au:icsm:egeodesy:0.4#Document,
urn:xml-gov-au:icsm:egeodesy:0.4#Setup,
urn:xml-gov-au:icsm:egeodesy:0.4#TerrestrialReferenceFrame,
urn:xml-gov-au:icsm:egeodesy:0.4#DynamicTransformation,
http://www.opengis.net/gml/3.2#AbstractCRS, null#FEATURE_LINK,
null#FEATURE_LINK
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html
Post by medley
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=0>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <[hidden email]
<http:///user/SendEmail.jtp?type=node&node=5324569&i=1>>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=2>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------
If you reply to this email, your message will be added to the discussion
http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML-
tp5324416p5324569.html
To unsubscribe from App-Schema Mapping File to GeodesyML, click here
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYXZjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ=>
.
NAML
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
Gavin Medley
USIP Intern
***@unavco.org




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416p5324752.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
medley
2017-06-22 14:46:35 UTC
Permalink
Hi everyone,

I just wanted to follow up on the subject of using Geoserver App Schema to
output WFS requests in the GeodesyML schema. I found a solution but I can't
explain why it works.

First, in the example mapping file I provided (quoted down below) my
<targetAttribute> XPath was incorrect. It should have read
geo:siteLog/geo:siteIdentification/geo:siteName. However, upon implementing
the correct XPath the output still didn't resolve. *I upgraded my Geoserver
instance from 2.11.1 to 2.12 SNAPSHOT and suddenly it worked.* Perhaps
someone else can explain why but it seems that 2.11 has problems resolving
XPaths when abstract XML types are involved.

Lastly, for some reason the GeodesyML output file gets automatically
downloaded with a .application extension rather than displaying in the
browser; also not sure why. I hope this can save someone frustration down
the line.

-Gavin

On Sat, Jun 17, 2017 at 9:34 PM, Ben Caradoc-Davies-2 [via OSGeo.org] <
Post by Ben Caradoc-Davies
Gavin,
https://github.com/GeoscienceAustralia/GeodesyML/
This means that it will only work with GML 3.2 output from GeoServer.
Either select a GML 3.2 output format, use WFS 2.0 (which defaults to
GML 3.2), or manually add outputformat=gml32 to a WFS 1.1 request.
http://docs.geoserver.org/latest/en/user/data/app-
schema/supported-gml-versions.html
http://docs.geoserver.org/latest/en/user/data/app-
schema/secondary-namespaces.html
schemaUri must be a URL. You can have multiple elements. The top-level
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
app-schema will cache it for you. Use a better URL if you have one (e.g.
from geodesyml.org).
I do not know GeodesyML and do not know what type you should choose.
Perhaps geo:Site? This is the thing that goes on targetElement.
Where is the siteName you mentioned? Could you use the gml:name
inherited from gml:AbstractFeatureType? The property name goes in
targetAttribute.
Deciding how to map your database to the XML schema is, according to
reports, 2/3 of the work.
Kind regards,
Ben.
Post by medley
Hi,
I am trying to have a Geoserver display GML its output in the GeodesyML
schema, outlined here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/> . In
particular, I am working with GPS monument meta data. For now I'm trying
to
Post by medley
just output the siteName in GeodesyML schema when I click GML in the
Layers
Post by medley
Preview in Geoserver. The relevant XML schema definition file for
GeodesyML
Post by medley
is called monumentInfo.xsd. Unfortunately, I can't seem to get the
mapping
Post by medley
correct from my database schema to GeodesyML. In particular I think the
problem is in the <targetElement> or <targetAttribute> fields within
<FeatureTypeMapping>. I concluded that I should use geo:GeodesyML as the
argument to schemaUri because it is the only xsd file with a top level
element (type GeodesyMLType).
How can I use the schema outlined in the monumentInfo.xsd schema
definition?
Post by medley
Specifically here, how can I map site_name in my database schema to
siteName
Post by medley
in the GeodesyML schema?
Any help is sincerely appreciated and I apologize if my lack of
familiarity
Post by medley
with XML is causing me to ask a silly question. I have done a fair bit
of
Post by medley
Google research. The tutorial I followed to get this far is here
<http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html>
,
Post by medley
with supporting documentation here
<http://docs.geoserver.org/stable/en/user/data/app-
schema/mapping-file.html>
Post by medley
but they are using GeoscienceML, not GeodesyML.
-Gavin Medley
*The view I am querying, called geoml_monuments contains:*
id | station_code | site_name | geolocation | iers_domex | country_name
I am pretty sure this is fine.
*The monumentsInfo.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd>
Post by medley
*The GeodesyML.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd>
Post by medley
*My mapping file:*
<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess
xmlns:as="http://www.geotools.org/app-schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.geotools.org/app-schema
AppSchemaDataAccess.xsd">
<namespaces>
<Namespace>
<prefix>geo</prefix>
<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
</Namespace>
<Namespace>
<prefix>gml</prefix>
<uri>http://www.opengis.net/gml/3.2</uri>
</Namespace>
<Namespace>
<prefix>gmd</prefix>
<uri>http://www.isotc211.org/2005/gmd</uri>
</Namespace>
</namespaces>
<includedTypes></includedTypes>
<sourceDataStores>
<DataStore>
<id>thedb</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgisng</value>
</Parameter>
<Parameter>
<name>host</name>
<value>thedatabaselocation.unavco.org</value>
</Parameter>
<Parameter>
<name>port</name>
<value>5432</value>
</Parameter>
<Parameter>
<name>database</name>
<value>tst3</value>
</Parameter>
<Parameter>
<name>user</name>
<value>theuser</value>
</Parameter>
<Parameter>
<name>passwd</name>
<value>thepassword</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<catalog></catalog>
<targetTypes>
<FeatureType>
<schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>thedb</sourceDataStore>
<sourceType>geoml_monuments</sourceType>
<targetElement>geo:GeodesyML</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>geo:siteIdentificationType/geo:siteName</targetAttribute>
<sourceExpression><OCQL>site_name</OCQL></sourceExpression>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
*The output upon clicking GML from Layer Preview:*
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
java.lang.RuntimeException: Error applying mapping with targetAttribute
geo:siteIdentificationType/geo:siteName Error applying mapping with
targetAttribute geo:siteIdentificationType/geo:siteName
geo:siteIdentificationType is not a valid location path for type
urn:xml-gov-au:icsm:egeodesy:0.4:GeodesyMLType.
geo:siteIdentificationType
Post by medley
http://www.opengis.net/gml/3.2#metaDataProperty,
http://www.opengis.net/gml/3.2#description,
http://www.opengis.net/gml/3.2#descriptionReference,
http://www.opengis.net/gml/3.2#identifier,
http://www.opengis.net/gml/3.2#name,
http://www.opengis.net/gml/3.2#boundedBy,
http://www.opengis.net/gml/3.2#location,
http://www.opengis.net/gml/3.2#validTime,
urn:xml-gov-au:icsm:egeodesy:0.4#Node,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPosition,
urn:xml-gov-au:icsm:egeodesy:0.4#PositionPairCovariance,
urn:xml-gov-au:icsm:egeodesy:0.4#Site,
urn:xml-gov-au:icsm:egeodesy:0.4#siteVisit,
urn:xml-gov-au:icsm:egeodesy:0.4#Monument,
urn:xml-gov-au:icsm:egeodesy:0.4#SupplementaryMark,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurement,
urn:xml-gov-au:icsm:egeodesy:0.4#Instrument,
urn:xml-gov-au:icsm:egeodesy:0.4#Sensor,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionEstimator,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractSiteLog,
urn:xml-gov-au:icsm:egeodesy:0.4#Project,
urn:xml-gov-au:icsm:egeodesy:0.4#Document,
urn:xml-gov-au:icsm:egeodesy:0.4#Setup,
urn:xml-gov-au:icsm:egeodesy:0.4#TerrestrialReferenceFrame,
urn:xml-gov-au:icsm:egeodesy:0.4#DynamicTransformation,
http://www.opengis.net/gml/3.2#AbstractCRS, null#FEATURE_LINK,
null#FEATURE_LINK
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html
Post by medley
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=0>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <[hidden email]
<http:///user/SendEmail.jtp?type=node&node=5324569&i=1>>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=2>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------
If you reply to this email, your message will be added to the discussion
http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML-
tp5324416p5324569.html
To unsubscribe from App-Schema Mapping File to GeodesyML, click here
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYXZjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ=>
.
NAML
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
Gavin Medley
USIP Intern
***@unavco.org




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416p5325213.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Ben Caradoc-Davies
2017-06-22 19:38:32 UTC
Permalink
Gavin,

I have not looked at the types involved in your case, but one of the new
changes on master is more thorough searching of substitution groups when
encoding properties of complex types:

[GEOT-5667] Fix app-schema property substitution group support
https://osgeo-org.atlassian.net/browse/GEOT-5667

This has not yet been backported to stable (2.11.x). I was wondering
about performance and would like to benchmark it before backporting.

The new default "application/gml+xml; version=3.2" MIME type is a recent
fix on master to conform to WFS 2.0:

[GEOS-8140] GeoServer uses invalid mime type for GML 3.2 responses
https://osgeo-org.atlassian.net/browse/GEOS-8140

You can change the MIME type back to "text/xml; subtype=gml/3.2" or
"text/xml" in the global WFS settings, which will cause it to be
displayed in your browser:
http://docs.geoserver.org/latest/en/user/services/wfs/webadmin.html#override-gml-3-2-mime-type

Kind regards,
Ben.
Post by medley
Hi everyone,
I just wanted to follow up on the subject of using Geoserver App Schema to
output WFS requests in the GeodesyML schema. I found a solution but I can't
explain why it works.
First, in the example mapping file I provided (quoted down below) my
<targetAttribute> XPath was incorrect. It should have read
geo:siteLog/geo:siteIdentification/geo:siteName. However, upon implementing
the correct XPath the output still didn't resolve. *I upgraded my Geoserver
instance from 2.11.1 to 2.12 SNAPSHOT and suddenly it worked.* Perhaps
someone else can explain why but it seems that 2.11 has problems resolving
XPaths when abstract XML types are involved.
Lastly, for some reason the GeodesyML output file gets automatically
downloaded with a .application extension rather than displaying in the
browser; also not sure why. I hope this can save someone frustration down
the line.
-Gavin
On Sat, Jun 17, 2017 at 9:34 PM, Ben Caradoc-Davies-2 [via OSGeo.org] <
Post by Ben Caradoc-Davies
Gavin,
https://github.com/GeoscienceAustralia/GeodesyML/
This means that it will only work with GML 3.2 output from GeoServer.
Either select a GML 3.2 output format, use WFS 2.0 (which defaults to
GML 3.2), or manually add outputformat=gml32 to a WFS 1.1 request.
http://docs.geoserver.org/latest/en/user/data/app-
schema/supported-gml-versions.html
http://docs.geoserver.org/latest/en/user/data/app-
schema/secondary-namespaces.html
schemaUri must be a URL. You can have multiple elements. The top-level
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
app-schema will cache it for you. Use a better URL if you have one (e.g.
from geodesyml.org).
I do not know GeodesyML and do not know what type you should choose.
Perhaps geo:Site? This is the thing that goes on targetElement.
Where is the siteName you mentioned? Could you use the gml:name
inherited from gml:AbstractFeatureType? The property name goes in
targetAttribute.
Deciding how to map your database to the XML schema is, according to
reports, 2/3 of the work.
Kind regards,
Ben.
Post by medley
Hi,
I am trying to have a Geoserver display GML its output in the GeodesyML
schema, outlined here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/> . In
particular, I am working with GPS monument meta data. For now I'm trying
to
Post by medley
just output the siteName in GeodesyML schema when I click GML in the
Layers
Post by medley
Preview in Geoserver. The relevant XML schema definition file for
GeodesyML
Post by medley
is called monumentInfo.xsd. Unfortunately, I can't seem to get the
mapping
Post by medley
correct from my database schema to GeodesyML. In particular I think the
problem is in the <targetElement> or <targetAttribute> fields within
<FeatureTypeMapping>. I concluded that I should use geo:GeodesyML as the
argument to schemaUri because it is the only xsd file with a top level
element (type GeodesyMLType).
How can I use the schema outlined in the monumentInfo.xsd schema
definition?
Post by medley
Specifically here, how can I map site_name in my database schema to
siteName
Post by medley
in the GeodesyML schema?
Any help is sincerely appreciated and I apologize if my lack of
familiarity
Post by medley
with XML is causing me to ask a silly question. I have done a fair bit
of
Post by medley
Google research. The tutorial I followed to get this far is here
<http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html>
,
Post by medley
with supporting documentation here
<http://docs.geoserver.org/stable/en/user/data/app-
schema/mapping-file.html>
Post by medley
but they are using GeoscienceML, not GeodesyML.
-Gavin Medley
*The view I am querying, called geoml_monuments contains:*
id | station_code | site_name | geolocation | iers_domex | country_name
I am pretty sure this is fine.
*The monumentsInfo.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd>
Post by medley
*The GeodesyML.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd>
Post by medley
*My mapping file:*
<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess
xmlns:as="http://www.geotools.org/app-schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.geotools.org/app-schema
AppSchemaDataAccess.xsd">
<namespaces>
<Namespace>
<prefix>geo</prefix>
<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
</Namespace>
<Namespace>
<prefix>gml</prefix>
<uri>http://www.opengis.net/gml/3.2</uri>
</Namespace>
<Namespace>
<prefix>gmd</prefix>
<uri>http://www.isotc211.org/2005/gmd</uri>
</Namespace>
</namespaces>
<includedTypes></includedTypes>
<sourceDataStores>
<DataStore>
<id>thedb</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgisng</value>
</Parameter>
<Parameter>
<name>host</name>
<value>thedatabaselocation.unavco.org</value>
</Parameter>
<Parameter>
<name>port</name>
<value>5432</value>
</Parameter>
<Parameter>
<name>database</name>
<value>tst3</value>
</Parameter>
<Parameter>
<name>user</name>
<value>theuser</value>
</Parameter>
<Parameter>
<name>passwd</name>
<value>thepassword</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<catalog></catalog>
<targetTypes>
<FeatureType>
<schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>thedb</sourceDataStore>
<sourceType>geoml_monuments</sourceType>
<targetElement>geo:GeodesyML</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>geo:siteIdentificationType/geo:siteName</targetAttribute>
<sourceExpression><OCQL>site_name</OCQL></sourceExpression>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
*The output upon clicking GML from Layer Preview:*
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
java.lang.RuntimeException: Error applying mapping with targetAttribute
geo:siteIdentificationType/geo:siteName Error applying mapping with
targetAttribute geo:siteIdentificationType/geo:siteName
geo:siteIdentificationType is not a valid location path for type
urn:xml-gov-au:icsm:egeodesy:0.4:GeodesyMLType.
geo:siteIdentificationType
Post by medley
http://www.opengis.net/gml/3.2#metaDataProperty,
http://www.opengis.net/gml/3.2#description,
http://www.opengis.net/gml/3.2#descriptionReference,
http://www.opengis.net/gml/3.2#identifier,
http://www.opengis.net/gml/3.2#name,
http://www.opengis.net/gml/3.2#boundedBy,
http://www.opengis.net/gml/3.2#location,
http://www.opengis.net/gml/3.2#validTime,
urn:xml-gov-au:icsm:egeodesy:0.4#Node,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPosition,
urn:xml-gov-au:icsm:egeodesy:0.4#PositionPairCovariance,
urn:xml-gov-au:icsm:egeodesy:0.4#Site,
urn:xml-gov-au:icsm:egeodesy:0.4#siteVisit,
urn:xml-gov-au:icsm:egeodesy:0.4#Monument,
urn:xml-gov-au:icsm:egeodesy:0.4#SupplementaryMark,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurement,
urn:xml-gov-au:icsm:egeodesy:0.4#Instrument,
urn:xml-gov-au:icsm:egeodesy:0.4#Sensor,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionEstimator,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractSiteLog,
urn:xml-gov-au:icsm:egeodesy:0.4#Project,
urn:xml-gov-au:icsm:egeodesy:0.4#Document,
urn:xml-gov-au:icsm:egeodesy:0.4#Setup,
urn:xml-gov-au:icsm:egeodesy:0.4#TerrestrialReferenceFrame,
urn:xml-gov-au:icsm:egeodesy:0.4#DynamicTransformation,
http://www.opengis.net/gml/3.2#AbstractCRS, null#FEATURE_LINK,
null#FEATURE_LINK
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html
Post by medley
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=0>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <[hidden email]
<http:///user/SendEmail.jtp?type=node&node=5324569&i=1>>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=2>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------
If you reply to this email, your message will be added to the discussion
http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML-
tp5324416p5324569.html
To unsubscribe from App-Schema Mapping File to GeodesyML, click here
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYXZjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ=>
.
NAML
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
Gavin Medley
2017-07-21 17:48:04 UTC
Permalink
Hi Ben,

With regards to the GML 3.2 MIME type issue, your solution didn't work for
me using 2.12 nightly build from mid June. However I believe that the issue
is that changing the MIME type via the dropdown menu in WFS settings
doesn't seem to do anything. I get .application files no matter what I
select. However, I have not tried restarting Geoserver after applying
settings. Does changing these settings require a restart???

Also, I've noticed that there is a workspace dropdown menu in the WFS
settings page but it only offers " " and "sar" as options. What is that
dropdown for?

-Gavin
Post by Ben Caradoc-Davies
Gavin,
I have not looked at the types involved in your case, but one of the new
changes on master is more thorough searching of substitution groups when
[GEOT-5667] Fix app-schema property substitution group support
https://osgeo-org.atlassian.net/browse/GEOT-5667
This has not yet been backported to stable (2.11.x). I was wondering about
performance and would like to benchmark it before backporting.
The new default "application/gml+xml; version=3.2" MIME type is a recent
[GEOS-8140] GeoServer uses invalid mime type for GML 3.2 responses
https://osgeo-org.atlassian.net/browse/GEOS-8140
You can change the MIME type back to "text/xml; subtype=gml/3.2" or
"text/xml" in the global WFS settings, which will cause it to be displayed
http://docs.geoserver.org/latest/en/user/services/wfs/webadm
in.html#override-gml-3-2-mime-type
Kind regards,
Ben.
Post by medley
Hi everyone,
I just wanted to follow up on the subject of using Geoserver App Schema to
output WFS requests in the GeodesyML schema. I found a solution but I can't
explain why it works.
First, in the example mapping file I provided (quoted down below) my
<targetAttribute> XPath was incorrect. It should have read
geo:siteLog/geo:siteIdentification/geo:siteName. However, upon implementing
the correct XPath the output still didn't resolve. *I upgraded my Geoserver
instance from 2.11.1 to 2.12 SNAPSHOT and suddenly it worked.* Perhaps
someone else can explain why but it seems that 2.11 has problems resolving
XPaths when abstract XML types are involved.
Lastly, for some reason the GeodesyML output file gets automatically
downloaded with a .application extension rather than displaying in the
browser; also not sure why. I hope this can save someone frustration down
the line.
-Gavin
On Sat, Jun 17, 2017 at 9:34 PM, Ben Caradoc-Davies-2 [via OSGeo.org] <
Gavin,
Post by medley
https://github.com/GeoscienceAustralia/GeodesyML/
This means that it will only work with GML 3.2 output from GeoServer.
Either select a GML 3.2 output format, use WFS 2.0 (which defaults to
GML 3.2), or manually add outputformat=gml32 to a WFS 1.1 request.
http://docs.geoserver.org/latest/en/user/data/app-
schema/supported-gml-versions.html
http://docs.geoserver.org/latest/en/user/data/app-
schema/secondary-namespaces.html
schemaUri must be a URL. You can have multiple elements. The top-level
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
app-schema will cache it for you. Use a better URL if you have one (e.g.
from geodesyml.org).
I do not know GeodesyML and do not know what type you should choose.
Perhaps geo:Site? This is the thing that goes on targetElement.
Where is the siteName you mentioned? Could you use the gml:name
inherited from gml:AbstractFeatureType? The property name goes in
targetAttribute.
Deciding how to map your database to the XML schema is, according to
reports, 2/3 of the work.
Kind regards,
Ben.
Hi,
Post by medley
I am trying to have a Geoserver display GML its output in the GeodesyML
schema, outlined here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/> . In
particular, I am working with GPS monument meta data. For now I'm trying
to
Post by medley
just output the siteName in GeodesyML schema when I click GML in the
Layers
Post by medley
Preview in Geoserver. The relevant XML schema definition file for
GeodesyML
Post by medley
is called monumentInfo.xsd. Unfortunately, I can't seem to get the
mapping
Post by medley
correct from my database schema to GeodesyML. In particular I think the
problem is in the <targetElement> or <targetAttribute> fields within
<FeatureTypeMapping>. I concluded that I should use geo:GeodesyML as the
argument to schemaUri because it is the only xsd file with a top level
element (type GeodesyMLType).
How can I use the schema outlined in the monumentInfo.xsd schema
definition?
Post by medley
Specifically here, how can I map site_name in my database schema to
siteName
Post by medley
in the GeodesyML schema?
Any help is sincerely appreciated and I apologize if my lack of
familiarity
Post by medley
with XML is causing me to ask a silly question. I have done a fair bit
of
Post by medley
Google research. The tutorial I followed to get this far is here
<http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html
,
Post by medley
with supporting documentation here
<http://docs.geoserver.org/stable/en/user/data/app-
schema/mapping-file.html>
Post by medley
but they are using GeoscienceML, not GeodesyML.
-Gavin Medley
*The view I am querying, called geoml_monuments contains:*
id | station_code | site_name | geolocation | iers_domex | country_name
I am pretty sure this is fine.
*The monumentsInfo.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd>
Post by medley
*The GeodesyML.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd>
Post by medley
*My mapping file:*
<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess
xmlns:as="http://www.geotools.org/app-schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.geotools.org/app-schema
AppSchemaDataAccess.xsd">
<namespaces>
<Namespace>
<prefix>geo</prefix>
<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
</Namespace>
<Namespace>
<prefix>gml</prefix>
<uri>http://www.opengis.net/gml/3.2</uri>
</Namespace>
<Namespace>
<prefix>gmd</prefix>
<uri>http://www.isotc211.org/2005/gmd</uri>
</Namespace>
</namespaces>
<includedTypes></includedTypes>
<sourceDataStores>
<DataStore>
<id>thedb</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgisng</value>
</Parameter>
<Parameter>
<name>host</name>
<value>thedatabaselocation.unavco.org</value>
</Parameter>
<Parameter>
<name>port</name>
<value>5432</value>
</Parameter>
<Parameter>
<name>database</name>
<value>tst3</value>
</Parameter>
<Parameter>
<name>user</name>
<value>theuser</value>
</Parameter>
<Parameter>
<name>passwd</name>
<value>thepassword</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<catalog></catalog>
<targetTypes>
<FeatureType>
<schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>thedb</sourceDataStore>
<sourceType>geoml_monuments</sourceType>
<targetElement>geo:GeodesyML</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>geo:siteIdentificationType/geo:siteName</ta
rgetAttribute>
<sourceExpression><OCQL>site_name</OCQL></sourceExpression>
Post by medley
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
*The output upon clicking GML from Layer Preview:*
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExcepti
onReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
Post by medley
<ows:ExceptionText>
java.lang.RuntimeException: Error applying mapping with targetAttribute
geo:siteIdentificationType/geo:siteName Error applying mapping with
targetAttribute geo:siteIdentificationType/geo:siteName
geo:siteIdentificationType is not a valid location path for type
urn:xml-gov-au:icsm:egeodesy:0.4:GeodesyMLType.
geo:siteIdentificationType
Post by medley
http://www.opengis.net/gml/3.2#metaDataProperty,
http://www.opengis.net/gml/3.2#description,
http://www.opengis.net/gml/3.2#descriptionReference,
http://www.opengis.net/gml/3.2#identifier,
http://www.opengis.net/gml/3.2#name,
http://www.opengis.net/gml/3.2#boundedBy,
http://www.opengis.net/gml/3.2#location,
http://www.opengis.net/gml/3.2#validTime,
urn:xml-gov-au:icsm:egeodesy:0.4#Node,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPosition,
urn:xml-gov-au:icsm:egeodesy:0.4#PositionPairCovariance,
urn:xml-gov-au:icsm:egeodesy:0.4#Site,
urn:xml-gov-au:icsm:egeodesy:0.4#siteVisit,
urn:xml-gov-au:icsm:egeodesy:0.4#Monument,
urn:xml-gov-au:icsm:egeodesy:0.4#SupplementaryMark,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurement,
urn:xml-gov-au:icsm:egeodesy:0.4#Instrument,
urn:xml-gov-au:icsm:egeodesy:0.4#Sensor,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionEstimator,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractSiteLog,
urn:xml-gov-au:icsm:egeodesy:0.4#Project,
urn:xml-gov-au:icsm:egeodesy:0.4#Document,
urn:xml-gov-au:icsm:egeodesy:0.4#Setup,
urn:xml-gov-au:icsm:egeodesy:0.4#TerrestrialReferenceFrame,
urn:xml-gov-au:icsm:egeodesy:0.4#DynamicTransformation,
http://www.opengis.net/gml/3.2#AbstractCRS, null#FEATURE_LINK,
null#FEATURE_LINK
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html
Post by medley
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
Post by medley
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=0>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <[hidden email]
<http:///user/SendEmail.jtp?type=node&node=5324569&i=1>>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=2>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------
If you reply to this email, your message will be added to the discussion
http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-
to-GeodesyML-
tp5324416p5324569.html
To unsubscribe from App-Schema Mapping File to GeodesyML, click here
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jt
p?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYX
Zjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ=>
.
NAML
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jt
p?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&b
ase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.
template.NabbleNamespace-nabble.view.web.template.NodeNamesp
ace&breadcrumbs=notify_subscribers%21nabble%3Aemail.
naml-instant_emails%21nabble%3Aemail.naml-send_instant_
email%21nabble%3Aemail.naml>
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Director
Transient Software Limited <http://transient.nz/>
New Zealand
--
*Gavin Medley*
*USIP Intern*
*UNAVCO*
***@unavco.org
Nuno Oliveira
2017-07-21 21:00:08 UTC
Permalink
Hi,

There is an issue that discuss the MIME type override:
https://osgeo-org.atlassian.net/browse/GEOS-8224

Resuming the discussing, MIME type and file extensions are related but are two different things.
The fix made for WFS 2.0 changed the default MIME type for WFS 2.0 GML32 responses, but didn't
do anything about the file extension.

The browser and pretty much any other client that needs to something with the content
will look at the MIME type to interpret the content.

So changing the MIME type should make your browser show the response content but will not do
nothing about the file extension (that's another issue).

So if you select let's say 'text\xml' as the override MIME type and do a GetFeature request does the
response get display in the browser ? and if not which MIME does you response have ?

Regarding the drop-down menu in the WFS settings. In GeoServer it is possible to configure a
service settings per workpsace (virtual services). The blank represents the global service configuration
and the other values (in your case sar) should correspond to existing workspaces and allows
you to configure those workspaces virtual service settings.

You can read more about GeoServer virtual services here:
http://docs.geoserver.org/stable/en/user/configuration/virtual-services.html

Regards,

Nuno Oliveira
Post by medley
Hi Ben,
With regards to the GML 3.2 MIME type issue, your solution didn't work for me using 2.12 nightly build from mid June. However I believe that the issue is that changing the MIME type via the dropdown menu in WFS settings doesn't seem to do anything. I get .application files no matter what I select. However, I have not tried restarting Geoserver after applying settings. Does changing these settings require a restart???
Also, I've noticed that there is a workspace dropdown menu in the WFS settings page but it only offers " " and "sar" as options. What is that dropdown for?
-Gavin
Gavin,
[GEOT-5667] Fix app-schema property substitution group support
https://osgeo-org.atlassian.net/browse/GEOT-5667 <https://osgeo-org.atlassian.net/browse/GEOT-5667>
This has not yet been backported to stable (2.11.x). I was wondering about performance and would like to benchmark it before backporting.
[GEOS-8140] GeoServer uses invalid mime type for GML 3.2 responses
https://osgeo-org.atlassian.net/browse/GEOS-8140 <https://osgeo-org.atlassian.net/browse/GEOS-8140>
http://docs.geoserver.org/latest/en/user/services/wfs/webadmin.html#override-gml-3-2-mime-type <http://docs.geoserver.org/latest/en/user/services/wfs/webadmin.html#override-gml-3-2-mime-type>
Kind regards,
Ben.
Hi everyone,
I just wanted to follow up on the subject of using Geoserver App Schema to
output WFS requests in the GeodesyML schema. I found a solution but I can't
explain why it works.
First, in the example mapping file I provided (quoted down below) my
<targetAttribute> XPath was incorrect. It should have read
geo:siteLog/geo:siteIdentification/geo:siteName. However, upon implementing
the correct XPath the output still didn't resolve. *I upgraded my Geoserver
instance from 2.11.1 to 2.12 SNAPSHOT and suddenly it worked.* Perhaps
someone else can explain why but it seems that 2.11 has problems resolving
XPaths when abstract XML types are involved.
Lastly, for some reason the GeodesyML output file gets automatically
downloaded with a .application extension rather than displaying in the
browser; also not sure why. I hope this can save someone frustration down
the line.
-Gavin
On Sat, Jun 17, 2017 at 9:34 PM, Ben Caradoc-Davies-2 [via OSGeo.org] <
Gavin,
https://github.com/GeoscienceAustralia/GeodesyML/ <https://github.com/GeoscienceAustralia/GeodesyML/>
This means that it will only work with GML 3.2 output from GeoServer.
Either select a GML 3.2 output format, use WFS 2.0 (which defaults to
GML 3.2), or manually add outputformat=gml32 to a WFS 1.1 request.
http://docs.geoserver.org/latest/en/user/data/app- <http://docs.geoserver.org/latest/en/user/data/app->
schema/supported-gml-versions.html
http://docs.geoserver.org/latest/en/user/data/app- <http://docs.geoserver.org/latest/en/user/data/app->
schema/secondary-namespaces.ht <http://secondary-namespaces.ht>ml
schemaUri must be a URL. You can have multiple elements. The top-level
https://github.com/GeoscienceAustralia/GeodesyML/ <https://github.com/GeoscienceAustralia/GeodesyML/>
blob/master/schemas/geodesyML.xsd
app-schema will cache it for you. Use a better URL if you have one (e.g.
from geodesyml.org <http://geodesyml.org>).
I do not know GeodesyML and do not know what type you should choose.
Perhaps geo:Site? This is the thing that goes on targetElement.
Where is the siteName you mentioned? Could you use the gml:name
inherited from gml:AbstractFeatureType? The property name goes in
targetAttribute.
Deciding how to map your database to the XML schema is, according to
reports, 2/3 of the work.
Kind regards,
Ben.
Hi,
I am trying to have a Geoserver display GML its output in the GeodesyML
schema, outlined here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/ <https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/>> . In
particular, I am working with GPS monument meta data. For now I'm trying
to
just output the siteName in GeodesyML schema when I click GML in the
Layers
Preview in Geoserver. The relevant XML schema definition file for
GeodesyML
is called monumentInfo.xsd. Unfortunately, I can't seem to get the
mapping
correct from my database schema to GeodesyML. In particular I think the
problem is in the <targetElement> or <targetAttribute> fields within
<FeatureTypeMapping>. I concluded that I should use geo:GeodesyML as the
argument to schemaUri because it is the only xsd file with a top level
element (type GeodesyMLType).
How can I use the schema outlined in the monumentInfo.xsd schema
definition?
Specifically here, how can I map site_name in my database schema to
siteName
in the GeodesyML schema?
Any help is sincerely appreciated and I apologize if my lack of
familiarity
with XML is causing me to ask a silly question. I have done a fair bit
of
Google research. The tutorial I followed to get this far is here
<http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html <http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html>>
,
with supporting documentation here
<http://docs.geoserver.org/stable/en/user/data/app- <http://docs.geoserver.org/stable/en/user/data/app->
schema/mapping-file.html>
but they are using GeoscienceML, not GeodesyML.
-Gavin Medley
*The view I am querying, called geoml_monuments contains:*
id | station_code | site_name | geolocation | iers_domex | country_name
I am pretty sure this is fine.
*The monumentsInfo.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/ <https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/>
monumentInfo.xsd
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/ <https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/>
monumentInfo.xsd>
*The GeodesyML.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/ <https://github.com/GeoscienceAustralia/GeodesyML/>
blob/master/schemas/geodesyML.xsd
<https://github.com/GeoscienceAustralia/GeodesyML/ <https://github.com/GeoscienceAustralia/GeodesyML/>
blob/master/schemas/geodesyML.xsd>
*My mapping file:*
<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess
xmlns:as="http://www.geotools.org/app-schema <http://www.geotools.org/app-schema>"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance>"
xsi:schemaLocation="http://www.geotools.org/app-schema <http://www.geotools.org/app-schema>
AppSchemaDataAccess.xsd">
<namespaces>
<Namespace>
<prefix>geo</prefix>
<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
</Namespace>
<Namespace>
<prefix>gml</prefix>
<uri>http://www.opengis.net/gml/3.2 <http://www.opengis.net/gml/3.2></uri>
</Namespace>
<Namespace>
<prefix>gmd</prefix>
<uri>http://www.isotc211.org/2005/gmd <http://www.isotc211.org/2005/gmd></uri>
</Namespace>
</namespaces>
<includedTypes></includedTypes>
<sourceDataStores>
<DataStore>
<id>thedb</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgisng</value>
</Parameter>
<Parameter>
<name>host</name>
<value>thedatabaselocation.unavco.org <http://thedatabaselocation.unavco.org></value>
</Parameter>
<Parameter>
<name>port</name>
<value>5432</value>
</Parameter>
<Parameter>
<name>database</name>
<value>tst3</value>
</Parameter>
<Parameter>
<name>user</name>
<value>theuser</value>
</Parameter>
<Parameter>
<name>passwd</name>
<value>thepassword</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<catalog></catalog>
<targetTypes>
<FeatureType>
<schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd <http://localhost/geodesyML_schemas/geodesyML.xsd></schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>thedb</sourceDataStore>
<sourceType>geoml_monuments</sourceType>
<targetElement>geo:GeodesyML</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>geo:siteIdentificationType/geo:siteName</targetAttribute>
<sourceExpression><OCQL>site_name</OCQL></sourceExpression>
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
*The output upon clicking GML from Layer Preview:*
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema>"
xmlns:ows="http://www.opengis.net/ows <http://www.opengis.net/ows>"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance <http://www.w3.org/2001/XMLSchema-instance>" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows <http://www.opengis.net/ows>
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd <http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd>">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
java.lang.RuntimeException: Error applying mapping with targetAttribute
geo:siteIdentificationType/geo:siteName Error applying mapping with
targetAttribute geo:siteIdentificationType/geo:siteName
geo:siteIdentificationType is not a valid location path for type
urn:xml-gov-au:icsm:egeodesy:0.4:GeodesyMLType.
geo:siteIdentificationType
http://www.opengis.net/gml/3.2#metaDataProperty <http://www.opengis.net/gml/3.2#metaDataProperty>,
http://www.opengis.net/gml/3.2#description <http://www.opengis.net/gml/3.2#description>,
http://www.opengis.net/gml/3.2#descriptionReference <http://www.opengis.net/gml/3.2#descriptionReference>,
http://www.opengis.net/gml/3.2#identifier <http://www.opengis.net/gml/3.2#identifier>,
http://www.opengis.net/gml/3.2#name <http://www.opengis.net/gml/3.2#name>,
http://www.opengis.net/gml/3.2#boundedBy <http://www.opengis.net/gml/3.2#boundedBy>,
http://www.opengis.net/gml/3.2#location <http://www.opengis.net/gml/3.2#location>,
http://www.opengis.net/gml/3.2#validTime <http://www.opengis.net/gml/3.2#validTime>,
urn:xml-gov-au:icsm:egeodesy:0.4#Node,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPosition,
urn:xml-gov-au:icsm:egeodesy:0.4#PositionPairCovariance,
urn:xml-gov-au:icsm:egeodesy:0.4#Site,
urn:xml-gov-au:icsm:egeodesy:0.4#siteVisit,
urn:xml-gov-au:icsm:egeodesy:0.4#Monument,
urn:xml-gov-au:icsm:egeodesy:0.4#SupplementaryMark,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurement,
urn:xml-gov-au:icsm:egeodesy:0.4#Instrument,
urn:xml-gov-au:icsm:egeodesy:0.4#Sensor,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionEstimator,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractSiteLog,
urn:xml-gov-au:icsm:egeodesy:0.4#Project,
urn:xml-gov-au:icsm:egeodesy:0.4#Document,
urn:xml-gov-au:icsm:egeodesy:0.4#Setup,
urn:xml-gov-au:icsm:egeodesy:0.4#TerrestrialReferenceFrame,
urn:xml-gov-au:icsm:egeodesy:0.4#DynamicTransformation,
http://www.opengis.net/gml/3.2#AbstractCRS <http://www.opengis.net/gml/3.2#AbstractCRS>, null#FEATURE_LINK,
null#FEATURE_LINK
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html <http://nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html>
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=0>
https://lists.sourceforge.net/lists/listinfo/geoserver-users <https://lists.sourceforge.net/lists/listinfo/geoserver-users>
--
Ben Caradoc-Davies <[hidden email]
<http:///user/SendEmail.jtp?type=node&node=5324569&i=1>>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=2>
https://lists.sourceforge.net/lists/listinfo/geoserver-users <https://lists.sourceforge.net/lists/listinfo/geoserver-users>
------------------------------
If you reply to this email, your message will be added to the discussion
http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML- <http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML->
tp5324416p5324569.html
To unsubscribe from App-Schema Mapping File to GeodesyML, click here
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYXZjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ= <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYXZjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ=>>
.
NAML
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users <https://lists.sourceforge.net/lists/listinfo/geoserver-users>
--
Director
Transient Software Limited <http://transient.nz/>
New Zealand
--
*Gavin Medley*
/USIP Intern/
*/UNAVCO/*
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo Ú consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
Ben Caradoc-Davies
2017-07-21 22:58:20 UTC
Permalink
Gavin,

the dropdown is for per-workspace settings (blank meaning global).
Restart should not be required, just hitting the save button at the end
of the page. Are you using virtual (per-workspace) service endpoints?
There is a bug that causes MIME type override to not work for virtual
services:

[GEOS-8224] On a GetFeature WFS 2.0 request on a virtual service is not
possible anymore to get the response in browser
https://osgeo-org.atlassian.net/browse/GEOS-8224

Kind regards,
Ben.
Post by medley
Hi Ben,
With regards to the GML 3.2 MIME type issue, your solution didn't work for
me using 2.12 nightly build from mid June. However I believe that the issue
is that changing the MIME type via the dropdown menu in WFS settings
doesn't seem to do anything. I get .application files no matter what I
select. However, I have not tried restarting Geoserver after applying
settings. Does changing these settings require a restart???
Also, I've noticed that there is a workspace dropdown menu in the WFS
settings page but it only offers " " and "sar" as options. What is that
dropdown for?
-Gavin
Post by Ben Caradoc-Davies
Gavin,
I have not looked at the types involved in your case, but one of the new
changes on master is more thorough searching of substitution groups when
[GEOT-5667] Fix app-schema property substitution group support
https://osgeo-org.atlassian.net/browse/GEOT-5667
This has not yet been backported to stable (2.11.x). I was wondering about
performance and would like to benchmark it before backporting.
The new default "application/gml+xml; version=3.2" MIME type is a recent
[GEOS-8140] GeoServer uses invalid mime type for GML 3.2 responses
https://osgeo-org.atlassian.net/browse/GEOS-8140
You can change the MIME type back to "text/xml; subtype=gml/3.2" or
"text/xml" in the global WFS settings, which will cause it to be displayed
http://docs.geoserver.org/latest/en/user/services/wfs/webadm
in.html#override-gml-3-2-mime-type
Kind regards,
Ben.
Post by medley
Hi everyone,
I just wanted to follow up on the subject of using Geoserver App Schema to
output WFS requests in the GeodesyML schema. I found a solution but I can't
explain why it works.
First, in the example mapping file I provided (quoted down below) my
<targetAttribute> XPath was incorrect. It should have read
geo:siteLog/geo:siteIdentification/geo:siteName. However, upon implementing
the correct XPath the output still didn't resolve. *I upgraded my Geoserver
instance from 2.11.1 to 2.12 SNAPSHOT and suddenly it worked.* Perhaps
someone else can explain why but it seems that 2.11 has problems resolving
XPaths when abstract XML types are involved.
Lastly, for some reason the GeodesyML output file gets automatically
downloaded with a .application extension rather than displaying in the
browser; also not sure why. I hope this can save someone frustration down
the line.
-Gavin
On Sat, Jun 17, 2017 at 9:34 PM, Ben Caradoc-Davies-2 [via OSGeo.org] <
Gavin,
Post by medley
https://github.com/GeoscienceAustralia/GeodesyML/
This means that it will only work with GML 3.2 output from GeoServer.
Either select a GML 3.2 output format, use WFS 2.0 (which defaults to
GML 3.2), or manually add outputformat=gml32 to a WFS 1.1 request.
http://docs.geoserver.org/latest/en/user/data/app-
schema/supported-gml-versions.html
http://docs.geoserver.org/latest/en/user/data/app-
schema/secondary-namespaces.html
schemaUri must be a URL. You can have multiple elements. The top-level
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
app-schema will cache it for you. Use a better URL if you have one (e.g.
from geodesyml.org).
I do not know GeodesyML and do not know what type you should choose.
Perhaps geo:Site? This is the thing that goes on targetElement.
Where is the siteName you mentioned? Could you use the gml:name
inherited from gml:AbstractFeatureType? The property name goes in
targetAttribute.
Deciding how to map your database to the XML schema is, according to
reports, 2/3 of the work.
Kind regards,
Ben.
Hi,
Post by medley
I am trying to have a Geoserver display GML its output in the GeodesyML
schema, outlined here
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/> . In
particular, I am working with GPS monument meta data. For now I'm trying
to
Post by medley
just output the siteName in GeodesyML schema when I click GML in the
Layers
Post by medley
Preview in Geoserver. The relevant XML schema definition file for
GeodesyML
Post by medley
is called monumentInfo.xsd. Unfortunately, I can't seem to get the
mapping
Post by medley
correct from my database schema to GeodesyML. In particular I think the
problem is in the <targetElement> or <targetAttribute> fields within
<FeatureTypeMapping>. I concluded that I should use geo:GeodesyML as the
argument to schemaUri because it is the only xsd file with a top level
element (type GeodesyMLType).
How can I use the schema outlined in the monumentInfo.xsd schema
definition?
Post by medley
Specifically here, how can I map site_name in my database schema to
siteName
Post by medley
in the GeodesyML schema?
Any help is sincerely appreciated and I apologize if my lack of
familiarity
Post by medley
with XML is causing me to ask a silly question. I have done a fair bit
of
Post by medley
Google research. The tutorial I followed to get this far is here
<http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html
,
Post by medley
with supporting documentation here
<http://docs.geoserver.org/stable/en/user/data/app-
schema/mapping-file.html>
Post by medley
but they are using GeoscienceML, not GeodesyML.
-Gavin Medley
*The view I am querying, called geoml_monuments contains:*
id | station_code | site_name | geolocation | iers_domex | country_name
I am pretty sure this is fine.
*The monumentsInfo.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
monumentInfo.xsd>
Post by medley
*The GeodesyML.xsd file:*
https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd
Post by medley
<https://github.com/GeoscienceAustralia/GeodesyML/
blob/master/schemas/geodesyML.xsd>
Post by medley
*My mapping file:*
<?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess
xmlns:as="http://www.geotools.org/app-schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.geotools.org/app-schema
AppSchemaDataAccess.xsd">
<namespaces>
<Namespace>
<prefix>geo</prefix>
<uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
</Namespace>
<Namespace>
<prefix>gml</prefix>
<uri>http://www.opengis.net/gml/3.2</uri>
</Namespace>
<Namespace>
<prefix>gmd</prefix>
<uri>http://www.isotc211.org/2005/gmd</uri>
</Namespace>
</namespaces>
<includedTypes></includedTypes>
<sourceDataStores>
<DataStore>
<id>thedb</id>
<parameters>
<Parameter>
<name>dbtype</name>
<value>postgisng</value>
</Parameter>
<Parameter>
<name>host</name>
<value>thedatabaselocation.unavco.org</value>
</Parameter>
<Parameter>
<name>port</name>
<value>5432</value>
</Parameter>
<Parameter>
<name>database</name>
<value>tst3</value>
</Parameter>
<Parameter>
<name>user</name>
<value>theuser</value>
</Parameter>
<Parameter>
<name>passwd</name>
<value>thepassword</value>
</Parameter>
</parameters>
</DataStore>
</sourceDataStores>
<catalog></catalog>
<targetTypes>
<FeatureType>
<schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd</schemaUri>
</FeatureType>
</targetTypes>
<typeMappings>
<FeatureTypeMapping>
<sourceDataStore>thedb</sourceDataStore>
<sourceType>geoml_monuments</sourceType>
<targetElement>geo:GeodesyML</targetElement>
<attributeMappings>
<AttributeMapping>
<targetAttribute>geo:siteIdentificationType/geo:siteName</ta
rgetAttribute>
<sourceExpression><OCQL>site_name</OCQL></sourceExpression>
Post by medley
</AttributeMapping>
</attributeMappings>
</FeatureTypeMapping>
</typeMappings>
</as:AppSchemaDataAccess>
*The output upon clicking GML from Layer Preview:*
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExcepti
onReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
Post by medley
<ows:ExceptionText>
java.lang.RuntimeException: Error applying mapping with targetAttribute
geo:siteIdentificationType/geo:siteName Error applying mapping with
targetAttribute geo:siteIdentificationType/geo:siteName
geo:siteIdentificationType is not a valid location path for type
urn:xml-gov-au:icsm:egeodesy:0.4:GeodesyMLType.
geo:siteIdentificationType
Post by medley
http://www.opengis.net/gml/3.2#metaDataProperty,
http://www.opengis.net/gml/3.2#description,
http://www.opengis.net/gml/3.2#descriptionReference,
http://www.opengis.net/gml/3.2#identifier,
http://www.opengis.net/gml/3.2#name,
http://www.opengis.net/gml/3.2#boundedBy,
http://www.opengis.net/gml/3.2#location,
http://www.opengis.net/gml/3.2#validTime,
urn:xml-gov-au:icsm:egeodesy:0.4#Node,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPosition,
urn:xml-gov-au:icsm:egeodesy:0.4#PositionPairCovariance,
urn:xml-gov-au:icsm:egeodesy:0.4#Site,
urn:xml-gov-au:icsm:egeodesy:0.4#siteVisit,
urn:xml-gov-au:icsm:egeodesy:0.4#Monument,
urn:xml-gov-au:icsm:egeodesy:0.4#SupplementaryMark,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurement,
urn:xml-gov-au:icsm:egeodesy:0.4#Instrument,
urn:xml-gov-au:icsm:egeodesy:0.4#Sensor,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionEstimator,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionSource,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionOperation,
urn:xml-gov-au:icsm:egeodesy:0.4#AbstractSiteLog,
urn:xml-gov-au:icsm:egeodesy:0.4#Project,
urn:xml-gov-au:icsm:egeodesy:0.4#Document,
urn:xml-gov-au:icsm:egeodesy:0.4#Setup,
urn:xml-gov-au:icsm:egeodesy:0.4#TerrestrialReferenceFrame,
urn:xml-gov-au:icsm:egeodesy:0.4#DynamicTransformation,
http://www.opengis.net/gml/3.2#AbstractCRS, null#FEATURE_LINK,
null#FEATURE_LINK
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
--
View this message in context: http://osgeo-org.1560.x6.
nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html
Post by medley
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
Post by medley
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=0>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ben Caradoc-Davies <[hidden email]
<http:///user/SendEmail.jtp?type=node&node=5324569&i=1>>
Director
Transient Software Limited <http://transient.nz/>
New Zealand
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[hidden email] <http:///user/SendEmail.jtp?type=node&node=5324569&i=2>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------
If you reply to this email, your message will be added to the discussion
http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-
to-GeodesyML-
tp5324416p5324569.html
To unsubscribe from App-Schema Mapping File to GeodesyML, click here
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jt
p?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYX
Zjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ=>
.
NAML
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jt
p?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&b
ase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.
template.NabbleNamespace-nabble.view.web.template.NodeNamesp
ace&breadcrumbs=notify_subscribers%21nabble%3Aemail.
naml-instant_emails%21nabble%3Aemail.naml-send_instant_
email%21nabble%3Aemail.naml>
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Director
Transient Software Limited <http://transient.nz/>
New Zealand
--
Ben Caradoc-Davies <***@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

Geoserver-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Loading...