Hi Bart,
I am pretty sure this is a known, un-fixed issue when using complex features served from Geoserver + AppSchema, due to the fact that gml:id isn’t getting resolved. I believe this is regardless of the underlying DB: we were working on PG + PostGIS, but should replicate on SQL Server.
With my previous team, we tried to figure out a way to fix the broken Stored Query, however we couldn’t achieve a clear resolution, and I am unsure if this was addressed.
Sorin RUSU
GIS
Pe marți, 16 aprilie 2019, 19:46:14 EEST, Verbeeck Bart (AIV) bart.verbeeck@anonymised.com a scris:
Dear list
I have a service providing harmonized data.
The service works, only the storedquery urn:ogc:def:query:OGC-WFS::GetFeatureById throws an error
I get the first record to find an ID
https://inspire.informatievlaanderen.be/overdrachtdiensten/hy-n/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&typeNames=hy-n%3AWatercourseLink&count=1
GetFeature/FeatureID works ok
https://inspire.informatievlaanderen.be/overdrachtdiensten/hy-n/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&typeNames=hy-n%3AWatercourseLink&FeatureID=vha_waterloopsegment_100000
The stored query throws an error: Could not find feature with specified id
https://inspire.informatievlaanderen.be/overdrachtdiensten/hy-n/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&storedquery_id=urn%3Aogc%3Adef%3Aquery%3AOGC-WFS%3A%3AGetFeatureById&outputformat=application%2Fgml%2Bxml%3B%20version%3D3.2&id=vha_waterloopsegment_100000&typename=hy-n%3AWatercourseLink
I use Geoserver 2.15
Data is stored in sqlserver
I use the AppSchema extension (And I paste the definition below)
Is there something wrong in this definition. The storedquery works all right in my other services, that don’t use the app schema extension.
For example
https://geoservices.beta.informatievlaanderen.be/overdrachtdiensten/Adressen/wfs?service=WFS&REQUEST=GetFeature&STOREDQUERY_ID=urn:ogc:def:query:OGC-WFS::GetFeatureById&ID=Adrespos.1000320856&typename=Adressen:Adrespos&outputformat=GML2
I examined the log files, but I couldn’t find anyting more than “Could not find feature with specified id” (GEOTOOLS_DEVELOPER_LOGGING)
Thanks
Bart
http://inspire.ec.europa.eu/schemas/hy-n/4.0/HydroNetwork.xsd
dataStore
WatercourseLink
hy-n:WatercourseLink
nns:beginLifespanVersion
beginLifespanVersion
nns:centrelineGeometry
strConcat(‘centrelineGeometry.’, getId())
SHAPE
nns:fictitious
fictitious
hy-n:flowDirection
xlink:href
flowDirection_href
hy-n:WatercourseLink
gml_id
gml:identifier
gml_identifier
codeSpace
gml_codespace
nns:inNetwork
nilReason
inNetwork
xsi:nil
if_then_else(isNull(inNetwork), Expression.NIL, ‘true’)
nns:inspireId/base:Identifier/base:localId
inspireId_localId
nns:inspireId/base:Identifier/base:namespace
inspireId_namespace
hy-n:length
length
xsi:nil
if_then_else(isNull(length), ‘true’, Expression.NIL)
uom
length_uom
nns:inspireId/base:Identifier/base:versionId
inspireId_versionId
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this list:
If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users