urn:ogc:def:query:OGC-WFS::GetFeatureById

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

urn:ogc:def:query:OGC-WFS::GetFeatureById

Verbeeck Bart (AIV)

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

 

 

 

        <targetTypes>

                <FeatureType>

                        <schemaUri>http://inspire.ec.europa.eu/schemas/hy-n/4.0/HydroNetwork.xsd</schemaUri>

                </FeatureType>

        </targetTypes>

        <typeMappings>

                <FeatureTypeMapping>

                        <sourceDataStore>dataStore</sourceDataStore>

                        <sourceType>WatercourseLink</sourceType>

                        <targetElement>hy-n:WatercourseLink</targetElement>

                        <attributeMappings>

                                <AttributeMapping>

                                    <targetAttribute>nns:beginLifespanVersion</targetAttribute>

                                    <sourceExpression>                       

                                        <OCQL>beginLifespanVersion</OCQL>                   

                                        </sourceExpression>               

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:centrelineGeometry</targetAttribute>

                                        <idExpression>

                                                <OCQL>strConcat('centrelineGeometry.', getId())</OCQL>

                                        </idExpression>

                                        <sourceExpression>

                                                <OCQL>SHAPE</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:fictitious</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>fictitious</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:flowDirection</targetAttribute>

                                        <ClientProperty>

                                                <name>xlink:href</name>

                                                <value>flowDirection_href</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:WatercourseLink</targetAttribute>

                                        <idExpression>

                                                <OCQL>gml_id</OCQL>

                                        </idExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>gml:identifier</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>gml_identifier</OCQL>

                                        </sourceExpression>

                                        <ClientProperty>

                                                <name>codeSpace</name>

                                                <value>gml_codespace</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inNetwork</targetAttribute>

                                        <ClientProperty>

                                                <name>nilReason</name>

                                                <value>inNetwork</value>

                                        </ClientProperty>

                                        <ClientProperty>

                                                <name>xsi:nil</name>

                                                <value>if_then_else(isNull(inNetwork), Expression.NIL, 'true')</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:localId</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_localId</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:namespace</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_namespace</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:length</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>length</OCQL>

                                        </sourceExpression>

                                        <ClientProperty>

                                                <name>xsi:nil</name>

                                                <value>if_then_else(isNull(length), 'true', Expression.NIL)</value>

                                        </ClientProperty>

                                        <ClientProperty>

                                                <name>uom</name>

                                                <value>length_uom</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:versionId</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_versionId</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                        </attributeMappings>

                </FeatureTypeMapping>

        </typeMappings>

 



_______________________________________________
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

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: urn:ogc:def:query:OGC-WFS::GetFeatureById

GeoServer - User mailing list
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) <[hidden email]> 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

 

 

 

        <targetTypes>

                <FeatureType>

                        <schemaUri>http://inspire.ec.europa.eu/schemas/hy-n/4.0/HydroNetwork.xsd</schemaUri>

                </FeatureType>

        </targetTypes>

        <typeMappings>

                <FeatureTypeMapping>

                        <sourceDataStore>dataStore</sourceDataStore>

                        <sourceType>WatercourseLink</sourceType>

                        <targetElement>hy-n:WatercourseLink</targetElement>

                        <attributeMappings>

                                <AttributeMapping>

                                    <targetAttribute>nns:beginLifespanVersion</targetAttribute>

                                    <sourceExpression>                       

                                        <OCQL>beginLifespanVersion</OCQL>                   

                                        </sourceExpression>               

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:centrelineGeometry</targetAttribute>

                                        <idExpression>

                                                <OCQL>strConcat('centrelineGeometry.', getId())</OCQL>

                                        </idExpression>

                                        <sourceExpression>

                                                <OCQL>SHAPE</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:fictitious</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>fictitious</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:flowDirection</targetAttribute>

                                        <ClientProperty>

                                                <name>xlink:href</name>

                                                <value>flowDirection_href</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:WatercourseLink</targetAttribute>

                                        <idExpression>

                                                <OCQL>gml_id</OCQL>

                                        </idExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>gml:identifier</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>gml_identifier</OCQL>

                                        </sourceExpression>

                                        <ClientProperty>

                                                <name>codeSpace</name>

                                                <value>gml_codespace</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inNetwork</targetAttribute>

                                        <ClientProperty>

                                                <name>nilReason</name>

                                                <value>inNetwork</value>

                                        </ClientProperty>

                                        <ClientProperty>

                                                <name>xsi:nil</name>

                                                <value>if_then_else(isNull(inNetwork), Expression.NIL, 'true')</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:localId</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_localId</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:namespace</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_namespace</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:length</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>length</OCQL>

                                        </sourceExpression>

                                        <ClientProperty>

                                                <name>xsi:nil</name>

                                                <value>if_then_else(isNull(length), 'true', Expression.NIL)</value>

                                        </ClientProperty>

                                        <ClientProperty>

                                                <name>uom</name>

                                                <value>length_uom</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:versionId</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_versionId</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                        </attributeMappings>

                </FeatureTypeMapping>

        </typeMappings>

 

_______________________________________________
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

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users


_______________________________________________
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

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: urn:ogc:def:query:OGC-WFS::GetFeatureById

jratike80
In reply to this post by Verbeeck Bart (AIV)

Hi,

 

I am rather sure that this response is from GeoServer and GetFeatureById seems to work.

 

https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/hy?request=GetFeature&service=wfs&version=2.0.0&storedquery_id=urn%3Aogc%3Adef%3Aquery%3AOGC-WFS%3A%3AGetFeatureById&id=HY-P_WATERCOURSE_94245318

 

-Jukka Rahkonen-

 

Lähettäjä: Rusu Sorin via Geoserver-users <[hidden email]>
Lähetetty: keskiviikko 17. huhtikuuta 2019 14.10
Vastaanottaja: [hidden email]; Verbeeck Bart (AIV) <[hidden email]>
Aihe: Re: [Geoserver-users] urn:ogc:def:query:OGC-WFS::GetFeatureById

 

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) <[hidden email]> 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

 

 

 

        <targetTypes>

                <FeatureType>

                        <schemaUri>http://inspire.ec.europa.eu/schemas/hy-n/4.0/HydroNetwork.xsd</schemaUri>

                </FeatureType>

        </targetTypes>

        <typeMappings>

                <FeatureTypeMapping>

                        <sourceDataStore>dataStore</sourceDataStore>

                        <sourceType>WatercourseLink</sourceType>

                        <targetElement>hy-n:WatercourseLink</targetElement>

                        <attributeMappings>

                                <AttributeMapping>

                                    <targetAttribute>nns:beginLifespanVersion</targetAttribute>

                                    <sourceExpression>                       

                                        <OCQL>beginLifespanVersion</OCQL>                   

                                        </sourceExpression>               

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:centrelineGeometry</targetAttribute>

                                        <idExpression>

                                                <OCQL>strConcat('centrelineGeometry.', getId())</OCQL>

                                        </idExpression>

                                        <sourceExpression>

                                                <OCQL>SHAPE</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:fictitious</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>fictitious</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:flowDirection</targetAttribute>

                                        <ClientProperty>

                                                <name>xlink:href</name>

                                                <value>flowDirection_href</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:WatercourseLink</targetAttribute>

                                        <idExpression>

                                                <OCQL>gml_id</OCQL>

                                        </idExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>gml:identifier</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>gml_identifier</OCQL>

                                        </sourceExpression>

                                        <ClientProperty>

                                                <name>codeSpace</name>

                                                <value>gml_codespace</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inNetwork</targetAttribute>

                                        <ClientProperty>

                                                <name>nilReason</name>

                                                <value>inNetwork</value>

                                        </ClientProperty>

                                        <ClientProperty>

                                                <name>xsi:nil</name>

                                                <value>if_then_else(isNull(inNetwork), Expression.NIL, 'true')</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:localId</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_localId</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:namespace</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_namespace</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:length</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>length</OCQL>

                                        </sourceExpression>

                                        <ClientProperty>

                                                <name>xsi:nil</name>

                                                <value>if_then_else(isNull(length), 'true', Expression.NIL)</value>

                                        </ClientProperty>

                                        <ClientProperty>

                                                <name>uom</name>

                                                <value>length_uom</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:versionId</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_versionId</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                        </attributeMappings>

                </FeatureTypeMapping>

        </typeMappings>

 

_______________________________________________
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

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users



_______________________________________________
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

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: urn:ogc:def:query:OGC-WFS::GetFeatureById

Andreas Schmitz-6
Rahkonen Jukka (MML) wrote:

Hi,

> I am rather sure that this response is from GeoServer and GetFeatureById seems to work.
>
> https://inspire-wfs.maanmittauslaitos.fi/inspire-wfs/hy?request=GetFeature&service=wfs&version=2.0.0&storedquery_id=urn%3Aogc%3Adef%3Aquery%3AOGC-WFS%3A%3AGetFeatureById&id=HY-P_WATERCOURSE_94245318

that's actually a deegree server, as you can see by looking at the
response headers.

Best regards, Andreas


_______________________________________________
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

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: urn:ogc:def:query:OGC-WFS::GetFeatureById

geowolf
In reply to this post by Verbeeck Bart (AIV)
Hi, 
I did a quick check, there are a couple of issues open related to GetFeatureById but none of them
returns the same error message:

It would be useful to have a ticket for this case as well, with a self-contained package (data, config, request) that
helps reproduce the problem

Cheers
Andrea



On Tue, Apr 16, 2019 at 6:48 PM Verbeeck Bart (AIV) <[hidden email]> wrote:

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

 

 

 

        <targetTypes>

                <FeatureType>

                        <schemaUri>http://inspire.ec.europa.eu/schemas/hy-n/4.0/HydroNetwork.xsd</schemaUri>

                </FeatureType>

        </targetTypes>

        <typeMappings>

                <FeatureTypeMapping>

                        <sourceDataStore>dataStore</sourceDataStore>

                        <sourceType>WatercourseLink</sourceType>

                        <targetElement>hy-n:WatercourseLink</targetElement>

                        <attributeMappings>

                                <AttributeMapping>

                                    <targetAttribute>nns:beginLifespanVersion</targetAttribute>

                                    <sourceExpression>                       

                                        <OCQL>beginLifespanVersion</OCQL>                   

                                        </sourceExpression>               

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:centrelineGeometry</targetAttribute>

                                        <idExpression>

                                                <OCQL>strConcat('centrelineGeometry.', getId())</OCQL>

                                        </idExpression>

                                        <sourceExpression>

                                                <OCQL>SHAPE</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:fictitious</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>fictitious</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:flowDirection</targetAttribute>

                                        <ClientProperty>

                                                <name>xlink:href</name>

                                                <value>flowDirection_href</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:WatercourseLink</targetAttribute>

                                        <idExpression>

                                                <OCQL>gml_id</OCQL>

                                        </idExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>gml:identifier</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>gml_identifier</OCQL>

                                        </sourceExpression>

                                        <ClientProperty>

                                                <name>codeSpace</name>

                                                <value>gml_codespace</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inNetwork</targetAttribute>

                                        <ClientProperty>

                                                <name>nilReason</name>

                                                <value>inNetwork</value>

                                        </ClientProperty>

                                        <ClientProperty>

                                                <name>xsi:nil</name>

                                                <value>if_then_else(isNull(inNetwork), Expression.NIL, 'true')</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:localId</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_localId</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:namespace</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_namespace</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>hy-n:length</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>length</OCQL>

                                        </sourceExpression>

                                        <ClientProperty>

                                                <name>xsi:nil</name>

                                                <value>if_then_else(isNull(length), 'true', Expression.NIL)</value>

                                        </ClientProperty>

                                        <ClientProperty>

                                                <name>uom</name>

                                                <value>length_uom</value>

                                        </ClientProperty>

                                </AttributeMapping>

                                <AttributeMapping>

                                        <targetAttribute>nns:inspireId/base:Identifier/base:versionId</targetAttribute>

                                        <sourceExpression>

                                                <OCQL>inspireId_versionId</OCQL>

                                        </sourceExpression>

                                </AttributeMapping>

                        </attributeMappings>

                </FeatureTypeMapping>

        </typeMappings>

 

_______________________________________________
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

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users


--

Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.



_______________________________________________
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

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users