Re: [deegree-users] Problem mapping feature type with Deegree 3.1 and Oracle.
OSGeo project deegree
Brought to you by:
deegreesfadmin,
tfr
From: Markus S. <sch...@oc...> - 2011-11-23 20:49:22
|
Hi Heryk, I found out why the exported xlink reference: http://132.156.112.185:8080/services/oracleTestWfs2?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetGmlObject&OUTPUTFORMAT=text%2Fxml%3B+subtype%3Dgml%2F3.2.1&TRAVERSEXLINKDEPTH=0&GMLOBJECTID=20001#20001 misses the feature id prefix (and without the feature type prefix, the above request/reference resolving will not work). The problem is that the value feature type of property "specification" in the GeoSciML application schema is not unique: <complexType name="GeologicFeaturePropertyType"> <sequence minOccurs="0"> <element ref="gsml:GeologicFeature"/> </sequence> <attributeGroup ref="gml:AssociationAttributeGroup"/> <attributeGroup ref="gml:OwnershipAttributeGroup"/> </complexType> GeologicFeature has two non-abstract subtypes (can be verified by clicking "Info" in the feature store view in the console): - gsml:GeologicFeature - gsmlga:GeologicEvent - gsmlgu:GeologicUnit Because of that, deegree does not know which feature type (GeologicEvent or GeologicUnit) is target by the Join in your configuration: <Feature path="."> <Join table="TRIT_SDO_RO.WFS_GEOLOGICUNITS" fromColumns="UNITCLASSIFIER_ID" toColumns="UNIT_ID"/> </Feature> I filed an issue [1] to support narrowing the value feature type in the config (thus leading to a unique value feature type). Right now, I see two options to get your setup working: 1. Modify the copy of the GeoSciML schema to make the subfeature definition unique: <complexType name="GeologicFeaturePropertyType"> <sequence minOccurs="0"> <element ref="gsml:GeologicUnit"/> </sequence> <attributeGroup ref="gml:AssociationAttributeGroup"/> <attributeGroup ref="gml:OwnershipAttributeGroup"/> </complexType> 2. Add an href column to your MappedFeature table for storing the actual xlink:href. This is the general approach and will work in any case (as it inherently supports disambiguating subfeature references). It even works with remote feature references. Please let me know if you need more help. Best regards, Markus [1] http://tracker.deegree.org/deegree-services/ticket/290 Am 23.11.2011 19:53, schrieb Markus Schneider: > Hi Heryk, > >> Yes the complex feature type mapping is probably the most complicated part. >> If I can get this down, the rest will be much easier. >> >> On feature requests I keep on getting gsml:MappedFeatures with >> gsml:specification elements that do not contain gsmlgu:GeologicUnit >> elements!!! >> >> Here’s a snippet example of a gsml:specification received on a getfeature >> request: > >> <gsml:specification >> xlink:href="http://132.156.112.185:8080/services/oracleTestWfs2?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetGmlObject&OUTPUTFORMAT=text%2Fxml%3B+subtype%3Dgml%2F3.2.1&TRAVERSEXLINKDEPTH=0&GMLOBJECTID=20001#20001" >> xmlns:xlink="http://www.w3.org/1999/xlink"></gsml:specification> > > I believe you're almost there! > > Two things to be considered: > > 1. Your gsml:specification element is *not* empty -- it contains a > reference (xlink:href) to the GeologicUnit subfeature. By default, > deegree 3 WFS exports subfeatures by reference (not inline). I know that > deegree 2 behaves differently, but deegree 3 WFS is more consistent with > the spec here. > > GetFeature requests allow for a special parameter (WFS 1.1.0: > traverseXlinkDepth / WFS 2.0.0: resolveDepth) to control the number of > subfeature levels to be resolved (inlined) in the response. Here's a > complete example request for resolving all nested subfeature levels: > > <?xml version="1.0" encoding="UTF-8"?><wfs:GetFeature version="1.1.0" > xmlns:gsml="http://xmlns.geosciml.org/GeoSciML-Core/3.0" > xmlns:wfs="http://www.opengis.net/wfs" > xmlns:gml="http://www.opengis.net/gml" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" outputFormat="text/xml; > subtype=gml/3.2.1" maxFeatures="1" traverseXlinkDepth="*"> > <wfs:Query typeName="gsml:MappedFeature" /> > </wfs:GetFeature> > > However, this will most probably not work until issue 2 is resolved. > > 2. The exported xlink reference: > > http://132.156.112.185:8080/services/oracleTestWfs2?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetGmlObject&OUTPUTFORMAT=text%2Fxml%3B+subtype%3Dgml%2F3.2.1&TRAVERSEXLINKDEPTH=0&GMLOBJECTID=20001#20001 > > appears broken. Note that you should be able to paste it into a browser > (unescaping & with &) and the WFS would return the referenced > GeologicUnit feature. > > This is most probably caused by a problem in the SQLFeatureStore. It is > currently best tested if "Href"-mapping columns are available. > > Can you verify if the following (modified) request works? > > http://132.156.112.185:8080/services/oracleTestWfs2?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetGmlObject&OUTPUTFORMAT=text%2Fxml%3B+subtype%3Dgml%2F3.2.1&TRAVERSEXLINKDEPTH=0&GMLOBJECTID=GSMLGU_GEOLOGICUNIT_20001#GSMLGU_GEOLOGICUNIT_20001 > > If this is the case, we're just one step away from getting it working. > > Best regards, > Markus > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > > > > _______________________________________________ > deegree-users mailing list > dee...@li... > https://lists.sourceforge.net/lists/listinfo/deegree-users -- Markus Schneider Occam Labs UG (haftungsbeschränkt) Godesberger Allee 139 53175 Bonn, Germany +49 228 93798874 http://www.occamlabs.de |