[Geoserver-users] BBOX filter on chained features

Hi,

Does anyone know if Geoserver support geometry filter (bbox) on chained features?

Here is the original question: http://sourceforge.net/p/geoserver/mailman/message/25673907/

I am using geoserver 2.7.2 and found it might still have this problem. Can anyone please help?

Thanks,

Wen

Hi Wen,
yes, it should work. Take a look at this example:

http://geoserver.geo-solutions.it/complexfeatures/geosciml/gsml_query.html#filtering-gsml-geologicunit-by-bbox

Is this what you’re trying to accomplish?

The example was tested against GeoServer 2.8-beta, so the upcoming GeoServer 2.8 will certainly work… but I can see no reason why it shouldn’t work in GeoServer 2.7.2 already.

Hope this helps.

···

On Thu, Sep 10, 2015 at 11:50 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Hi,

Does anyone know if Geoserver support geometry filter (bbox) on chained features?

Here is the original question: http://sourceforge.net/p/geoserver/mailman/message/25673907/

I am using geoserver 2.7.2 and found it might still have this problem. Can anyone please help?

Thanks,

Wen


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Thanks, Stefano

I tried the filter on geoserver 2.7.2 and 2.8, both returned with no record and no error.

Is this because the data source are property files (included in app-schema plugin package) instead of database?

Is bbox filter on nested features working in WFS 2.0?

Thanks again,

Wen

···

Hi Wen,

yes, it should work. Take a look at this example:

http://geoserver.geo-solutions.it/complexfeatures/geosciml/gsml_query.html#filtering-gsml-geologicunit-by-bbox

Is this what you’re trying to accomplish?

The example was tested against GeoServer 2.8-beta, so the upcoming GeoServer 2.8 will certainly work… but I can see no reason why it shouldn’t work in GeoServer 2.7.2 already.

Hope this helps.

On Thu, Sep 10, 2015 at 11:50 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Hi,

Does anyone know if Geoserver support geometry filter (bbox) on chained features?

Here is the original question: http://sourceforge.net/p/geoserver/mailman/message/25673907/

I am using geoserver 2.7.2 and found it might still have this problem. Can anyone please help?

Thanks,

Wen


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Hi Wen,

···

On Fri, Sep 11, 2015 at 5:13 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Thanks, Stefano

I tried the filter on geoserver 2.7.2 and 2.8, both returned with no record and no error.

Is this because the data source are property files (included in app-schema plugin package) instead of database?

Uhm, I don’t think so, I can see in the code base automated tests filtering on nested feature attributes, and the tests are using property files as data source.

Are you 100% sure some feature should match the filter?
Could you post:

  • data (you’re using fake data anyway, right?)
  • mapping configuration
  • full WFS request

…so I can try to reproduce the issue?

Is bbox filter on nested features working in WFS 2.0?

Yes, check out this other example.

Thanks again,

Wen

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Friday, September 11, 2015 4:06 AM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users@lists.sourceforge.net
Subject: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

yes, it should work. Take a look at this example:

http://geoserver.geo-solutions.it/complexfeatures/geosciml/gsml_query.html#filtering-gsml-geologicunit-by-bbox

Is this what you’re trying to accomplish?

The example was tested against GeoServer 2.8-beta, so the upcoming GeoServer 2.8 will certainly work… but I can see no reason why it shouldn’t work in GeoServer 2.7.2 already.

Hope this helps.

On Thu, Sep 10, 2015 at 11:50 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Hi,

Does anyone know if Geoserver support geometry filter (bbox) on chained features?

Here is the original question: http://sourceforge.net/p/geoserver/mailman/message/25673907/

I am using geoserver 2.7.2 and found it might still have this problem. Can anyone please help?

Thanks,

Wen


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Best regards,
Stefano Costa
 
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
 
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
 
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.
 

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Stefano,

In case the first email with attachment failed due to company policy, I send it again without the attachment.

I am testing the sample included in the tutorial with app-schema extension.

I also tried feature chaining with Oracle as the data source using WFS 2.0.

The filters on non-geometry fields in nested feature are working. But BBOX filter is not.

I got an error:

<ows:ExceptionReport version=“2.0.0” xsi:schemaLocation=“http://www.opengis.net/ows/1.1 http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd”>

<ows:Exception exceptionCode=“NoApplicableCode”>

ows:ExceptionText

java.lang.RuntimeException: java.io.IOException

java.io.IOException Expecting a feature to apply filter, but found: SimpleFeatureTypeImpl A_WT identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

A_WT is the table for the top level feature (AirspaceVolume). UUID,CODESPACE,REC_ID are columns in this table.

The geometry field is in the nested feature (Surface).

Here is the filter:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service=“WFS” version=“2.0.0”

xmlns=“http://www.opengis.net/wfs/2.0

xmlns:aixm=“http://www.aixm.aero/schema/5.1

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd ">

fes:Filter

fes:BBOX

fes:ValueReference

aixm:horizontalProjection/aixm:Surface </fes:ValueReference>

gml:Envelope

gml:lowerCorner33.49 -99</gml:lowerCorner>

gml:upperCorner55.59 -78</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

Thanks for help,

Wen

···

From: Yin, Wentao (IS) (Contr)
Sent: Friday, September 11, 2015 11:14 AM
To: ‘Stefano Costa’
Cc: geoserver-users@lists.sourceforge.net
Subject: RE: EXT :Re: [Geoserver-users] BBOX filter on chained features

Thanks, Stefano

I tried the filter on geoserver 2.7.2 and 2.8, both returned with no record and no error.

Is this because the data source are property files (included in app-schema plugin package) instead of database?

Is bbox filter on nested features working in WFS 2.0?

Thanks again,

Wen

From: Stefano Costa [mailto:stefano.costa@…1107…]
Sent: Friday, September 11, 2015 4:06 AM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users@lists.sourceforge.net
Subject: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

yes, it should work. Take a look at this example:

http://geoserver.geo-solutions.it/complexfeatures/geosciml/gsml_query.html#filtering-gsml-geologicunit-by-bbox

Is this what you’re trying to accomplish?

The example was tested against GeoServer 2.8-beta, so the upcoming GeoServer 2.8 will certainly work… but I can see no reason why it shouldn’t work in GeoServer 2.7.2 already.

Hope this helps.

On Thu, Sep 10, 2015 at 11:50 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Hi,

Does anyone know if Geoserver support geometry filter (bbox) on chained features?

Here is the original question: http://sourceforge.net/p/geoserver/mailman/message/25673907/

I am using geoserver 2.7.2 and found it might still have this problem. Can anyone please help?

Thanks,

Wen


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Hi Wen,
yes, I got the attachment, but didn’t have much success with it so far: for me, no filter on nested properties is working, which seems really weird.

Anyway, you said you got filters on nested non-geometry attributes working, right?

A couple of things you could try to make the BBOX filter working:

  1. make sure that if you run the BBOX filter against the MappedFeature feature type, you actually get something in return
  2. If you don’t get any feature back, try to flip longitute with latitude in your BBOX coordinates (for some reason I don’t understand yet, I had to do it to get some feature back)

As for the second mapping involving schemas from http://www.aixm.aero/schema/5.1, you didn’t post your app-schema configuration, so I can’t help you much with it… but I saw you’re trying to filter on the property aixm:horizontalProjection/aixm:Surface, which is not a regular GML geometry property… maybe that is way the BBOX filter is not working, it is not recognized as a geometry by app-schema (I’m just guessing here though). How are you mapping that property?

···

On Sun, Sep 13, 2015 at 11:15 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Stefano,

In case the first email with attachment failed due to company policy, I send it again without the attachment.

I am testing the sample included in the tutorial with app-schema extension.

I also tried feature chaining with Oracle as the data source using WFS 2.0.

The filters on non-geometry fields in nested feature are working. But BBOX filter is not.

I got an error:

<ows:ExceptionReport version=“2.0.0” xsi:schemaLocation=“http://www.opengis.net/ows/1.1 http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd”>

<ows:Exception exceptionCode=“NoApplicableCode”>

ows:ExceptionText

java.lang.RuntimeException: java.io.IOException

java.io.IOException Expecting a feature to apply filter, but found: SimpleFeatureTypeImpl A_WT identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

A_WT is the table for the top level feature (AirspaceVolume). UUID,CODESPACE,REC_ID are columns in this table.

The geometry field is in the nested feature (Surface).

Here is the filter:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service=“WFS” version=“2.0.0”

xmlns=“http://www.opengis.net/wfs/2.0

xmlns:aixm=“http://www.aixm.aero/schema/5.1

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd ">

fes:Filter

fes:BBOX

fes:ValueReference

aixm:horizontalProjection/aixm:Surface </fes:ValueReference>

gml:Envelope

gml:lowerCorner33.49 -99</gml:lowerCorner>

gml:upperCorner55.59 -78</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

Thanks for help,

Wen

From: Yin, Wentao (IS) (Contr)
Sent: Friday, September 11, 2015 11:14 AM
To: ‘Stefano Costa’
Cc: geoserver-users@lists.sourceforge.net
Subject: RE: EXT :Re: [Geoserver-users] BBOX filter on chained features

Thanks, Stefano

I tried the filter on geoserver 2.7.2 and 2.8, both returned with no record and no error.

Is this because the data source are property files (included in app-schema plugin package) instead of database?

Is bbox filter on nested features working in WFS 2.0?

Thanks again,

Wen

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Friday, September 11, 2015 4:06 AM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users@lists.sourceforge.net
Subject: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

yes, it should work. Take a look at this example:

http://geoserver.geo-solutions.it/complexfeatures/geosciml/gsml_query.html#filtering-gsml-geologicunit-by-bbox

Is this what you’re trying to accomplish?

The example was tested against GeoServer 2.8-beta, so the upcoming GeoServer 2.8 will certainly work… but I can see no reason why it shouldn’t work in GeoServer 2.7.2 already.

Hope this helps.

On Thu, Sep 10, 2015 at 11:50 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Hi,

Does anyone know if Geoserver support geometry filter (bbox) on chained features?

Here is the original question: http://sourceforge.net/p/geoserver/mailman/message/25673907/

I am using geoserver 2.7.2 and found it might still have this problem. Can anyone please help?

Thanks,

Wen


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Best regards,
Stefano Costa
 
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
 
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
 
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.
 

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

[Second send attempt, first mail was blocked due to attachment.]

Hi Wen,
it seems I figured it out, at least for the sample mapping / data: looks
like chaining on the gml:name[2] property is not working (this deserves
further investigation, btw), so I chained on FEATURE_LINK instead and now
it's working ok.

In the attached ZIP archive you'll find the modified mapping conf. and a
couple of sample requests, one speaking WFS 1.1, another speaking WFS 2.0
(notice that this second one specifies outputFormat="gml3": this is
necessary to have geometries properly encoded, since GeoSciML 2.0 is based
on GML 3.1).

Hope this helps.

On Mon, Sep 14, 2015 at 10:24 AM, Stefano Costa <
stefano.costa@anonymised.com> wrote:

Hi Wen,
yes, I got the attachment, but didn't have much success with it so far:
for me, no filter on nested properties is working, which seems really weird.

Anyway, you said you got filters on nested non-geometry attributes
working, right?

A couple of things you could try to make the BBOX filter working:
1) make sure that if you run the BBOX filter against the MappedFeature
feature type, you actually get something in return
2) If you don't get any feature back, try to flip longitute with latitude
in your BBOX coordinates (for some reason I don't understand yet, I had to
do it to get some feature back)

As for the second mapping involving schemas from
http://www.aixm.aero/schema/5.1, you didn't post your app-schema
configuration, so I can't help you much with it... but I saw you're trying
to filter on the property aixm:horizontalProjection/aixm:Surface, which
is not a regular GML geometry property... maybe that is way the BBOX filter
is not working, it is not recognized as a geometry by app-schema (I'm just
guessing here though). How are you mapping that property?

On Sun, Sep 13, 2015 at 11:15 PM, Yin, Wentao (IS) (Contr) <
Wentao.Yin@anonymised.com> wrote:

Stefano,

In case the first email with attachment failed due to company policy, I
send it again without the attachment.

I am testing the sample included in the tutorial with app-schema
extension.

I also tried feature chaining with Oracle as the data source using WFS
2.0.

The filters on non-geometry fields in nested feature are working. But
BBOX filter is not.

I got an error:

<ows:ExceptionReport version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1
http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd
<http://www.opengis.net/ows/1.1%20http:/localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd&gt;
">

<ows:Exception exceptionCode="NoApplicableCode">

<ows:ExceptionText>

java.lang.RuntimeException: java.io.IOException

java.io.IOException Expecting a feature to apply filter, but found:
SimpleFeatureTypeImpl A_WT identified extends
Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

A_WT is the table for the top level feature (AirspaceVolume).
UUID,CODESPACE,REC_ID are columns in this table.

The geometry field is in the nested feature (Surface).

Here is the filter:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service="WFS" version="2.0.0"

    xmlns="http://www.opengis.net/wfs/2.0&quot;

   xmlns:aixm="http://www.aixm.aero/schema/5.1&quot;

    xmlns:gml="http://www.opengis.net/gml/3.2&quot;

    xmlns:fes="http://www.opengis.net/fes/2.0&quot;

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;

    xsi:schemaLocation="http://www.opengis.net/gml/3.2
http://schemas.opengis.net/gml/3.2.1/gml.xsd
http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd ">

  <Query typeNames="aixm:AirspaceVolume" >

        <fes:Filter>

                <fes:BBOX>

                  <fes:ValueReference>

                              aixm:horizontalProjection/aixm:Surface
</fes:ValueReference>

                        <gml:Envelope>

                                <gml:lowerCorner>33.49
-99</gml:lowerCorner>

                                <gml:upperCorner>55.59
-78</gml:upperCorner>

                        </gml:Envelope>

                </fes:BBOX>

        </fes:Filter>

  </Query>

</GetFeature>

Thanks for help,

Wen

*From:* Yin, Wentao (IS) (Contr)
*Sent:* Friday, September 11, 2015 11:14 AM
*To:* 'Stefano Costa'
*Cc:* geoserver-users@lists.sourceforge.net
*Subject:* RE: EXT :Re: [Geoserver-users] BBOX filter on chained
features

Thanks, Stefano

I tried the filter on geoserver 2.7.2 and 2.8, both returned with no
record and no error.

Is this because the data source are property files (included in
app-schema plugin package) instead of database?

Is bbox filter on nested features working in WFS 2.0?

Thanks again,

Wen

*From:* Stefano Costa [mailto:stefano.costa@anonymised.com
<stefano.costa@anonymised.com>]
*Sent:* Friday, September 11, 2015 4:06 AM
*To:* Yin, Wentao (IS) (Contr)
*Cc:* geoserver-users@lists.sourceforge.net
*Subject:* EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

yes, it should work. Take a look at this example:

http://geoserver.geo-solutions.it/complexfeatures/geosciml/gsml_query.html#filtering-gsml-geologicunit-by-bbox

Is this what you're trying to accomplish?

The example was tested against GeoServer 2.8-beta, so the upcoming
GeoServer 2.8 will certainly work... but I can see no reason why it
shouldn't work in GeoServer 2.7.2 already.

Hope this helps.

On Thu, Sep 10, 2015 at 11:50 PM, Yin, Wentao (IS) (Contr) <
Wentao.Yin@anonymised.com> wrote:

Hi,

Does anyone know if Geoserver support geometry filter (bbox) on chained
features?

Here is the original question:
http://sourceforge.net/p/geoserver/mailman/message/25673907/

I am using geoserver 2.7.2 and found it might still have this problem.
Can anyone please help?

Thanks,

Wen

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts!
Visithttp://goo.gl/it488V for more information.

Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.ithttp://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.

gsml_example.7z (7.37 KB)

Hi Wen,
please stay on the ML.

Your mapping looks a bit strange (at least to me):

  1. You’re mapping a geometry (aixm:Surface) as a feature

  2. You’re mapping the horizontalProjection property as a multi-valued property (true), but it’s not

  3. I was expecting a foreign key column in the GPS table, pointing to the G table: where is it? Is it true that g.id = gps.id, as your mapping suggests? So gps.id is both primary key of the gps table and foreing key referencing g.id?

  4. What type are the geometries stored in gps.longlat? The name of the column suggests you have points in there, but you’re mapping it to a gml:LinearRing

  5. This thread seems to confirm my doubts about types extending the base GML types (e.g. aixm:SurfaceType, which extends gml:SurfaceType): GeoServer uses statically defined Java bindings for all geometry types, so it is not comfortable with user-defined geometry types

···

On Mon, Sep 14, 2015 at 2:46 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Thanks, Stefano,

I can do BBOX query on surface if I make it a feature, but always got the error when query on it as a nested feature.

The query I am using:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service=“WFS” version=“2.0.0” xmlns=“http://www.opengis.net/wfs/2.0

xmlns:aixm=“http://www.aixm.aero/schema/5.1

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd ">

fes:Filter

fes:BBOX

fes:ValueReference

aixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing</fes:ValueReference>

gml:Envelope

gml:lowerCorner33.49 -99</gml:lowerCorner>

gml:upperCorner55.59 -78</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

The error:

<ows:ExceptionReport version=“2.0.0” xsi:schemaLocation=“http://www.opengis.net/ows/1.1 http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd”><ows:Exception exceptionCode=“NoApplicableCode”>ows:ExceptionTextjava.lang.RuntimeException: java.io.IOException

java.io.IOExceptionExpecting a feature to apply filter, but found: SimpleFeatureTypeImpl G identified extends Feature(ID:ID,NAME:NAME)</ows:ExceptionText></ows:Exception></ows:ExceptionReport>

Here are the mapping files:

Aixm_Surface.xml:

<?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”>

gml

http://www.opengis.net/gml/3.2

aixm

http://www.aixm.aero/schema/5.1

datastore

dbtype

Oracle

host

localhost

port

1521

database

XE

user

testdb

passwd

123

Expose primary keys

true

http://www.aixm.aero/gallery/content/public/schema/5.1/AIXM_Features.xsd

aixm_surface

datastore

GPS

aixm:Surface

aixm:Surface

ID

gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing

LONGLAT

FEATURE_LINK

ID

</as:AppSchemaDataAccess>

Aixm_AirspaceVoume.xml:

<?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”>

gml

http://www.opengis.net/gml/3.2

aixm

http://www.aixm.aero/schema/5.1

datastore

dbtype

Oracle

host

localhost

port

1521

database

XE

user

testdb

passwd

123

Expose primary keys

true

http://www.aixm.aero/gallery/content/public/schema/5.1/AIXM_Features.xsd

aixm_AirspaceVolume

datastore

G

aixm:AirspaceVolume

aixm:AirspaceVolume

ID

aixm:horizontalProjection

ID

aixm_surface

FEATURE_LINK

true

</as:AppSchemaDataAccess>

CREATE TABLE gps (id INT, longlat MDSYS.SDO_GEOMETRY);

CREATE TABLE g (id INT, name VARCHAR2(10));

Thanks again for help!

Wen

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Monday, September 14, 2015 4:25 AM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

yes, I got the attachment, but didn’t have much success with it so far: for me, no filter on nested properties is working, which seems really weird.

Anyway, you said you got filters on nested non-geometry attributes working, right?

A couple of things you could try to make the BBOX filter working:

  1. make sure that if you run the BBOX filter against the MappedFeature feature type, you actually get something in return

  2. If you don’t get any feature back, try to flip longitute with latitude in your BBOX coordinates (for some reason I don’t understand yet, I had to do it to get some feature back)

As for the second mapping involving schemas from http://www.aixm.aero/schema/5.1, you didn’t post your app-schema configuration, so I can’t help you much with it… but I saw you’re trying to filter on the property aixm:horizontalProjection/aixm:Surface, which is not a regular GML geometry property… maybe that is way the BBOX filter is not working, it is not recognized as a geometry by app-schema (I’m just guessing here though). How are you mapping that property?

On Sun, Sep 13, 2015 at 11:15 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Stefano,

In case the first email with attachment failed due to company policy, I send it again without the attachment.

I am testing the sample included in the tutorial with app-schema extension.

I also tried feature chaining with Oracle as the data source using WFS 2.0.

The filters on non-geometry fields in nested feature are working. But BBOX filter is not.

I got an error:

<ows:ExceptionReport version=“2.0.0” xsi:schemaLocation=“http://www.opengis.net/ows/1.1 http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd”>

<ows:Exception exceptionCode=“NoApplicableCode”>

ows:ExceptionText

java.lang.RuntimeException: java.io.IOException

java.io.IOException Expecting a feature to apply filter, but found: SimpleFeatureTypeImpl A_WT identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

A_WT is the table for the top level feature (AirspaceVolume). UUID,CODESPACE,REC_ID are columns in this table.

The geometry field is in the nested feature (Surface).

Here is the filter:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service=“WFS” version=“2.0.0”

xmlns=“http://www.opengis.net/wfs/2.0

xmlns:aixm=“http://www.aixm.aero/schema/5.1

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd ">

fes:Filter

fes:BBOX

fes:ValueReference

aixm:horizontalProjection/aixm:Surface </fes:ValueReference>

gml:Envelope

gml:lowerCorner33.49 -99</gml:lowerCorner>

gml:upperCorner55.59 -78</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

Thanks for help,

Wen

From: Yin, Wentao (IS) (Contr)
Sent: Friday, September 11, 2015 11:14 AM
To: ‘Stefano Costa’
Cc: geoserver-users@lists.sourceforge.net
Subject: RE: EXT :Re: [Geoserver-users] BBOX filter on chained features

Thanks, Stefano

I tried the filter on geoserver 2.7.2 and 2.8, both returned with no record and no error.

Is this because the data source are property files (included in app-schema plugin package) instead of database?

Is bbox filter on nested features working in WFS 2.0?

Thanks again,

Wen

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Friday, September 11, 2015 4:06 AM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users@lists.sourceforge.net
Subject: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

yes, it should work. Take a look at this example:

http://geoserver.geo-solutions.it/complexfeatures/geosciml/gsml_query.html#filtering-gsml-geologicunit-by-bbox

Is this what you’re trying to accomplish?

The example was tested against GeoServer 2.8-beta, so the upcoming GeoServer 2.8 will certainly work… but I can see no reason why it shouldn’t work in GeoServer 2.7.2 already.

Hope this helps.

On Thu, Sep 10, 2015 at 11:50 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Hi,

Does anyone know if Geoserver support geometry filter (bbox) on chained features?

Here is the original question: http://sourceforge.net/p/geoserver/mailman/message/25673907/

I am using geoserver 2.7.2 and found it might still have this problem. Can anyone please help?

Thanks,

Wen


Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Best regards,
Stefano Costa
 
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
 
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
 
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.
 

Best regards,
Stefano Costa
 
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
 
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
 
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.
 

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Stefano,

Thanks for the quick response. Please see my comments in blue.

  1. You’re mapping a geometry (aixm:Surface) as a feature

You are right. I know the mapping is a bit strange. As you can see from AIXM schema, an AirspaceVolume can have multiple Surfaces,

So I think it might be good to use feature chaining and treat Surface as a feature or non-feature.

  1. You’re mapping the horizontalProjection property as a multi-valued property (true), but it’s not

Will correct this.

  1. I was expecting a foreign key column in the GPS table, pointing to the G table: where is it? Is it true that g.id = gps.id, as your mapping suggests? So gps.id is both primary key of the gps table and foreing key referencing g.id?

Yes. You are correct.

  1. What type are the geometries stored in gps.longlat? The name of the column suggests you have points in there, but you’re mapping it to a gml:LinearRing

Points are stored in gps.longlat.

  1. This thread seems to confirm my doubts about types extending the base GML types (e.g. aixm:SurfaceType, which extends gml:SurfaceType): GeoServer uses statically defined Java bindings for all geometry types, so it is not comfortable with user-defined geometry types

Do you have any suggestions about this? And on AIXM mapping?

Thank you so much!

Wen

···

Hi Wen,

please stay on the ML.

Your mapping looks a bit strange (at least to me):

  1. You’re mapping a geometry (aixm:Surface) as a feature

  2. You’re mapping the horizontalProjection property as a multi-valued property (true), but it’s not

  3. I was expecting a foreign key column in the GPS table, pointing to the G table: where is it? Is it true that g.id = gps.id, as your mapping suggests? So gps.id is both primary key of the gps table and foreing key referencing g.id?

  4. What type are the geometries stored in gps.longlat? The name of the column suggests you have points in there, but you’re mapping it to a gml:LinearRing

  5. This thread seems to confirm my doubts about types extending the base GML types (e.g. aixm:SurfaceType, which extends gml:SurfaceType): GeoServer uses statically defined Java bindings for all geometry types, so it is not comfortable with user-defined geometry types

On Mon, Sep 14, 2015 at 2:46 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Thanks, Stefano,

I can do BBOX query on surface if I make it a feature, but always got the error when query on it as a nested feature.

The query I am using:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service=“WFS” version=“2.0.0” xmlns=“http://www.opengis.net/wfs/2.0

xmlns:aixm=“http://www.aixm.aero/schema/5.1

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd ">

fes:Filter

fes:BBOX

fes:ValueReference

aixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing</fes:ValueReference>

gml:Envelope

gml:lowerCorner33.49 -99</gml:lowerCorner>

gml:upperCorner55.59 -78</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

The error:

<ows:ExceptionReport version=“2.0.0” xsi:schemaLocation=“http://www.opengis.net/ows/1.1 http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd”><ows:Exception exceptionCode=“NoApplicableCode”>ows:ExceptionTextjava.lang.RuntimeException: java.io.IOException

java.io.IOExceptionExpecting a feature to apply filter, but found: SimpleFeatureTypeImpl G identified extends Feature(ID:ID,NAME:NAME)</ows:ExceptionText></ows:Exception></ows:ExceptionReport>

Here are the mapping files:

Aixm_Surface.xml:

<?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”>

gml

http://www.opengis.net/gml/3.2

aixm

http://www.aixm.aero/schema/5.1

datastore

dbtype

Oracle

host

localhost

port

1521

database

XE

user

testdb

passwd

123

Expose primary keys

true

http://www.aixm.aero/gallery/content/public/schema/5.1/AIXM_Features.xsd

aixm_surface

datastore

GPS

aixm:Surface

aixm:Surface

ID

gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing

LONGLAT

FEATURE_LINK

ID

</as:AppSchemaDataAccess>

Aixm_AirspaceVoume.xml:

<?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”>

gml

http://www.opengis.net/gml/3.2

aixm

http://www.aixm.aero/schema/5.1

datastore

dbtype

Oracle

host

localhost

port

1521

database

XE

user

testdb

passwd

123

Expose primary keys

true

http://www.aixm.aero/gallery/content/public/schema/5.1/AIXM_Features.xsd

aixm_AirspaceVolume

datastore

G

aixm:AirspaceVolume

aixm:AirspaceVolume

ID

aixm:horizontalProjection

ID

aixm_surface

FEATURE_LINK

true

</as:AppSchemaDataAccess>

CREATE TABLE gps (id INT, longlat MDSYS.SDO_GEOMETRY);

CREATE TABLE g (id INT, name VARCHAR2(10));

Thanks again for help!

Wen


Stefano,

I tried geometry filters on nested features on both WFS1.1 and WFS2.0, no record returned. But it does return records if the filter is applied to MappedFeature directly.

Is there any working sample available?

Thanks,

Wen

···

Hi Wen,

please stay on the ML.

Your mapping looks a bit strange (at least to me):

  1. You’re mapping a geometry (aixm:Surface) as a feature

  2. You’re mapping the horizontalProjection property as a multi-valued property (true), but it’s not

  3. I was expecting a foreign key column in the GPS table, pointing to the G table: where is it? Is it true that g.id = gps.id, as your mapping suggests? So gps.id is both primary key of the gps table and foreing key referencing g.id?

  4. What type are the geometries stored in gps.longlat? The name of the column suggests you have points in there, but you’re mapping it to a gml:LinearRing

  5. This thread seems to confirm my doubts about types extending the base GML types (e.g. aixm:SurfaceType, which extends gml:SurfaceType): GeoServer uses statically defined Java bindings for all geometry types, so it is not comfortable with user-defined geometry types

On Mon, Sep 14, 2015 at 2:46 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Thanks, Stefano,

I can do BBOX query on surface if I make it a feature, but always got the error when query on it as a nested feature.

….




Hi Wen,
did you try with the mapping configuration I attached to a previous e-mail?

In case you didn’t get the mail because of the attachment, I’ll copy-paste the relevant sections in the body of this mail.

gsml_GeologicUnit.xml:

datastore gsml_GeologicUnit gsml:GeologicUnit gsml:GeologicUnit ID gml:description DESCRIPTION gml:name[1] NAME codeSpace 'urn:x-test:classifierScheme:TestAuthority:GeologicUnitName' gml:name[2] CODE codeSpace 'urn:x-test:classifierScheme:TestAuthority:GeologicUnitCode' gml:name[3] URN codeSpace 'urn:x-test:classifierScheme:TestAuthority:GeologicUnitId' gsml:occurrence URN gsml:MappedFeature FEATURE_LINK true

gsml_MappedFeature.xml:

datastore gsml_MappedFeature gsml:MappedFeature gsml:MappedFeature ID gml:name[1] NAME gml:name[2] GU_URN FEATURE_LINK GU_URN gsml:specification xlink:href GU_URN gsml:shape SHAPE gsml:observationMethod/gsml:CGI_TermValue/gsml:value 'urn:ogc:def:nil:OGC:missing' codeSpace 'urn:ietf:rfc:2141' gsml:positionalAccuracy gsml:CGI_TermValuePropertyType gsml:positionalAccuracy/gsml:CGI_TermValue/gsml:value 'urn:ogc:def:nil:OGC:missing' codeSpace 'urn:ietf:rfc:2141'

What did the trick for me was to chain the two features using the special FEATURE_LINK attribute instead of gml:name (see highlighted sections).

I just tested the two requests below and they work for me:

WFS 2.0 with GML 3.1 output:

<?xml version="1.0" encoding="UTF-8"?>



fes:Filter
fes:BBOX
fes:ValueReferencegsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>
gml:Envelope
gml:lowerCorner143.49 -39</gml:lowerCorner>–>
gml:upperCorner143.50 -38</gml:upperCorner>–>
</gml:Envelope>
</fes:BBOX>
</fes:Filter>

WFS 1.1:

<?xml version="1.0" encoding="utf-8"?>

<wfs:GetFeature service=“WFS” version=“1.1.0”
xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”
xmlns:wfs=“http://www.opengis.net/wfs
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:gml=“http://www.opengis.net/gml”>
<wfs:Query typeName=“gsml:GeologicUnit”>
ogc:Filter
ogc:Intersects
ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>
gml:Envelope
gml:lowerCorner143.49 -39</gml:lowerCorner>
gml:upperCorner143.50 -38</gml:upperCorner>
</gml:Envelope>
</ogc:Intersects>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

Hope this helps.

···

On Wed, Sep 16, 2015 at 7:38 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Stefano,

I tried geometry filters on nested features on both WFS1.1 and WFS2.0, no record returned. But it does return records if the filter is applied to MappedFeature directly.

Is there any working sample available?

Thanks,

Wen


WFS 2.0

<?xml version="1.0" encoding="UTF-8"?>

<wfs:GetFeature service=“WFS” version=“2.0.0” xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:wfs=“http://www.opengis.net/wfs/2.0” xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd">

<wfs:Query typeNames=“gsml:GeologicUnit”>

fes:Filter

fes:BBOX

fes:ValueReference

gsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>

gml:Envelope

gml:lowerCorner-100 -100</gml:lowerCorner>

gml:upperCorner3000 3000</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

</wfs:Query>

</wfs:GetFeature>


WFS 1.1

<wfs:GetFeature service=“WFS” version=“1.1.0”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“gsml:GeologicUnit”>

ogc:Filter

ogc:Intersects

ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>

gml:upperCorner143.50 -38</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Monday, September 14, 2015 3:39 PM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

please stay on the ML.

Your mapping looks a bit strange (at least to me):

  1. You’re mapping a geometry (aixm:Surface) as a feature

  2. You’re mapping the horizontalProjection property as a multi-valued property (true), but it’s not

  3. I was expecting a foreign key column in the GPS table, pointing to the G table: where is it? Is it true that g.id = gps.id, as your mapping suggests? So gps.id is both primary key of the gps table and foreing key referencing g.id?

  4. What type are the geometries stored in gps.longlat? The name of the column suggests you have points in there, but you’re mapping it to a gml:LinearRing

  5. This thread seems to confirm my doubts about types extending the base GML types (e.g. aixm:SurfaceType, which extends gml:SurfaceType): GeoServer uses statically defined Java bindings for all geometry types, so it is not comfortable with user-defined geometry types

On Mon, Sep 14, 2015 at 2:46 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Thanks, Stefano,

I can do BBOX query on surface if I make it a feature, but always got the error when query on it as a nested feature.

….

 
 
 

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Stefano,

Thanks so much! This one works!

Wen

···

Hi Wen,

did you try with the mapping configuration I attached to a previous e-mail?

In case you didn’t get the mail because of the attachment, I’ll copy-paste the relevant sections in the body of this mail.

gsml_GeologicUnit.xml:

datastore

gsml_GeologicUnit

gsml:GeologicUnit

gsml:GeologicUnit

ID

gml:description

DESCRIPTION

gml:name[1]

NAME

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitName’

gml:name[2]

CODE

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitCode’

gml:name[3]

URN

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitId’

gsml:occurrence

URN

gsml:MappedFeature

FEATURE_LINK

true

gsml_MappedFeature.xml:

datastore

gsml_MappedFeature

gsml:MappedFeature

gsml:MappedFeature

ID

gml:name[1]

NAME

gml:name[2]

GU_URN

FEATURE_LINK

GU_URN

gsml:specification

xlink:href

GU_URN

gsml:shape

SHAPE

gsml:observationMethod/gsml:CGI_TermValue/gsml:value

‘urn:ogc:def:nil:OGC:missing’

codeSpace

‘urn:ietf:rfc:2141’

gsml:positionalAccuracy

gsml:CGI_TermValuePropertyType

gsml:positionalAccuracy/gsml:CGI_TermValue/gsml:value

‘urn:ogc:def:nil:OGC:missing’

codeSpace

‘urn:ietf:rfc:2141’

What did the trick for me was to chain the two features using the special FEATURE_LINK attribute instead of gml:name (see highlighted sections).

I just tested the two requests below and they work for me:

WFS 2.0 with GML 3.1 output:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service=“WFS” version=“2.0.0”

outputFormat=“gml3”

xmlns=“http://www.opengis.net/wfs/2.0

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:fes=“http://www.opengis.net/fes/2.0”>

fes:Filter

fes:BBOX

fes:ValueReferencegsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>–>

gml:upperCorner143.50 -38</gml:upperCorner>–>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

WFS 1.1:

<?xml version="1.0" encoding="utf-8"?>

<wfs:GetFeature service=“WFS” version=“1.1.0”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“gsml:GeologicUnit”>

ogc:Filter

ogc:Intersects

ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>

gml:upperCorner143.50 -38</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

Hope this helps.

On Wed, Sep 16, 2015 at 7:38 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Stefano,

I tried geometry filters on nested features on both WFS1.1 and WFS2.0, no record returned. But it does return records if the filter is applied to MappedFeature directly.

Is there any working sample available?

Thanks,

Wen


WFS 2.0

<?xml version="1.0" encoding="UTF-8"?>

<wfs:GetFeature service=“WFS” version=“2.0.0” xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:wfs=“http://www.opengis.net/wfs/2.0” xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd">

<wfs:Query typeNames=“gsml:GeologicUnit”>

fes:Filter

fes:BBOX

fes:ValueReference

gsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>

gml:Envelope

gml:lowerCorner-100 -100</gml:lowerCorner>

gml:upperCorner3000 3000</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

</wfs:Query>

</wfs:GetFeature>


WFS 1.1

<wfs:GetFeature service=“WFS” version=“1.1.0”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“gsml:GeologicUnit”>

ogc:Filter

ogc:Intersects

ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>

gml:upperCorner143.50 -38</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

From: Stefano Costa [mailto:stefano.costa@…1107…]
Sent: Monday, September 14, 2015 3:39 PM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

please stay on the ML.

Your mapping looks a bit strange (at least to me):

  1. You’re mapping a geometry (aixm:Surface) as a feature

  2. You’re mapping the horizontalProjection property as a multi-valued property (true), but it’s not

  3. I was expecting a foreign key column in the GPS table, pointing to the G table: where is it? Is it true that g.id = gps.id, as your mapping suggests? So gps.id is both primary key of the gps table and foreing key referencing g.id?

  4. What type are the geometries stored in gps.longlat? The name of the column suggests you have points in there, but you’re mapping it to a gml:LinearRing

  5. This thread seems to confirm my doubts about types extending the base GML types (e.g. aixm:SurfaceType, which extends gml:SurfaceType): GeoServer uses statically defined Java bindings for all geometry types, so it is not comfortable with user-defined geometry types

On Mon, Sep 14, 2015 at 2:46 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Thanks, Stefano,

I can do BBOX query on surface if I make it a feature, but always got the error when query on it as a nested feature.

….

 
 
 

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Glad to hear that :slight_smile:

However, I suspect there’s a bug somewhere, chaining on gml:name should have worked just as well: I’ll investigate and open a JIRA issue if necessary.

···

On Wed, Sep 16, 2015 at 9:01 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Stefano,

Thanks so much! This one works!

Wen

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Wednesday, September 16, 2015 2:14 PM

To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

did you try with the mapping configuration I attached to a previous e-mail?

In case you didn’t get the mail because of the attachment, I’ll copy-paste the relevant sections in the body of this mail.

gsml_GeologicUnit.xml:

datastore

gsml_GeologicUnit

gsml:GeologicUnit

gsml:GeologicUnit

ID

gml:description

DESCRIPTION

gml:name[1]

NAME

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitName’

gml:name[2]

CODE

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitCode’

gml:name[3]

URN

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitId’

gsml:occurrence

URN

gsml:MappedFeature

FEATURE_LINK

true

gsml_MappedFeature.xml:

datastore

gsml_MappedFeature

gsml:MappedFeature

gsml:MappedFeature

ID

gml:name[1]

NAME

gml:name[2]

GU_URN

FEATURE_LINK

GU_URN

gsml:specification

xlink:href

GU_URN

gsml:shape

SHAPE

gsml:observationMethod/gsml:CGI_TermValue/gsml:value

‘urn:ogc:def:nil:OGC:missing’

codeSpace

‘urn:ietf:rfc:2141’

gsml:positionalAccuracy

gsml:CGI_TermValuePropertyType

gsml:positionalAccuracy/gsml:CGI_TermValue/gsml:value

‘urn:ogc:def:nil:OGC:missing’

codeSpace

‘urn:ietf:rfc:2141’

What did the trick for me was to chain the two features using the special FEATURE_LINK attribute instead of gml:name (see highlighted sections).

I just tested the two requests below and they work for me:

WFS 2.0 with GML 3.1 output:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service=“WFS” version=“2.0.0”

outputFormat=“gml3”

xmlns=“http://www.opengis.net/wfs/2.0

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:fes=“http://www.opengis.net/fes/2.0”>

fes:Filter

fes:BBOX

fes:ValueReferencegsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>–>

gml:upperCorner143.50 -38</gml:upperCorner>–>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

WFS 1.1:

<?xml version="1.0" encoding="utf-8"?>

<wfs:GetFeature service=“WFS” version=“1.1.0”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“gsml:GeologicUnit”>

ogc:Filter

ogc:Intersects

ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>

gml:upperCorner143.50 -38</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

Hope this helps.

On Wed, Sep 16, 2015 at 7:38 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Stefano,

I tried geometry filters on nested features on both WFS1.1 and WFS2.0, no record returned. But it does return records if the filter is applied to MappedFeature directly.

Is there any working sample available?

Thanks,

Wen


WFS 2.0

<?xml version="1.0" encoding="UTF-8"?>

<wfs:GetFeature service=“WFS” version=“2.0.0” xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:wfs=“http://www.opengis.net/wfs/2.0” xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd">

<wfs:Query typeNames=“gsml:GeologicUnit”>

fes:Filter

fes:BBOX

fes:ValueReference

gsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>

gml:Envelope

gml:lowerCorner-100 -100</gml:lowerCorner>

gml:upperCorner3000 3000</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

</wfs:Query>

</wfs:GetFeature>


WFS 1.1

<wfs:GetFeature service=“WFS” version=“1.1.0”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“gsml:GeologicUnit”>

ogc:Filter

ogc:Intersects

ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>

gml:upperCorner143.50 -38</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Monday, September 14, 2015 3:39 PM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

please stay on the ML.

Your mapping looks a bit strange (at least to me):

  1. You’re mapping a geometry (aixm:Surface) as a feature

  2. You’re mapping the horizontalProjection property as a multi-valued property (true), but it’s not

  3. I was expecting a foreign key column in the GPS table, pointing to the G table: where is it? Is it true that g.id = gps.id, as your mapping suggests? So gps.id is both primary key of the gps table and foreing key referencing g.id?

  4. What type are the geometries stored in gps.longlat? The name of the column suggests you have points in there, but you’re mapping it to a gml:LinearRing

  5. This thread seems to confirm my doubts about types extending the base GML types (e.g. aixm:SurfaceType, which extends gml:SurfaceType): GeoServer uses statically defined Java bindings for all geometry types, so it is not comfortable with user-defined geometry types

On Mon, Sep 14, 2015 at 2:46 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Thanks, Stefano,

I can do BBOX query on surface if I make it a feature, but always got the error when query on it as a nested feature.

….

 
 
 

Best regards,
Stefano Costa
 
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
 
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
 
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.
 

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Thanks! Stefano,

For AIXM, I always got an error like SimpleFeatureTypeImpl AIRSPACE identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

When using BBOX on nested feature even if the top feature Airspace is a FEATURE.

Wen

···

Glad to hear that :slight_smile:

However, I suspect there’s a bug somewhere, chaining on gml:name should have worked just as well: I’ll investigate and open a JIRA issue if necessary.

On Wed, Sep 16, 2015 at 9:01 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Stefano,

Thanks so much! This one works!

Wen

From: Stefano Costa [mailto:stefano.costa@…1107…]
Sent: Wednesday, September 16, 2015 2:14 PM

To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

did you try with the mapping configuration I attached to a previous e-mail?

In case you didn’t get the mail because of the attachment, I’ll copy-paste the relevant sections in the body of this mail.

gsml_GeologicUnit.xml:

datastore

gsml_GeologicUnit

gsml:GeologicUnit

gsml:GeologicUnit

ID

gml:description

DESCRIPTION

gml:name[1]

NAME

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitName’

gml:name[2]

CODE

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitCode’

gml:name[3]

URN

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitId’

gsml:occurrence

URN

gsml:MappedFeature

FEATURE_LINK

true

gsml_MappedFeature.xml:

datastore

gsml_MappedFeature

gsml:MappedFeature

gsml:MappedFeature

ID

gml:name[1]

NAME

gml:name[2]

GU_URN

FEATURE_LINK

GU_URN

gsml:specification

xlink:href

GU_URN

gsml:shape

SHAPE

gsml:observationMethod/gsml:CGI_TermValue/gsml:value

‘urn:ogc:def:nil:OGC:missing’

codeSpace

‘urn:ietf:rfc:2141’

gsml:positionalAccuracy

gsml:CGI_TermValuePropertyType

gsml:positionalAccuracy/gsml:CGI_TermValue/gsml:value

‘urn:ogc:def:nil:OGC:missing’

codeSpace

‘urn:ietf:rfc:2141’

What did the trick for me was to chain the two features using the special FEATURE_LINK attribute instead of gml:name (see highlighted sections).

I just tested the two requests below and they work for me:

WFS 2.0 with GML 3.1 output:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service=“WFS” version=“2.0.0”

outputFormat=“gml3”

xmlns=“http://www.opengis.net/wfs/2.0

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:fes=“http://www.opengis.net/fes/2.0”>

fes:Filter

fes:BBOX

fes:ValueReferencegsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>–>

gml:upperCorner143.50 -38</gml:upperCorner>–>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

WFS 1.1:

<?xml version="1.0" encoding="utf-8"?>

<wfs:GetFeature service=“WFS” version=“1.1.0”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“gsml:GeologicUnit”>

ogc:Filter

ogc:Intersects

ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>

gml:upperCorner143.50 -38</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

Hope this helps.

On Wed, Sep 16, 2015 at 7:38 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Stefano,

I tried geometry filters on nested features on both WFS1.1 and WFS2.0, no record returned. But it does return records if the filter is applied to MappedFeature directly.

Is there any working sample available?

Thanks,

Wen


WFS 2.0

<?xml version="1.0" encoding="UTF-8"?>

<wfs:GetFeature service=“WFS” version=“2.0.0” xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:wfs=“http://www.opengis.net/wfs/2.0” xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd">

<wfs:Query typeNames=“gsml:GeologicUnit”>

fes:Filter

fes:BBOX

fes:ValueReference

gsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>

gml:Envelope

gml:lowerCorner-100 -100</gml:lowerCorner>

gml:upperCorner3000 3000</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

</wfs:Query>

</wfs:GetFeature>


WFS 1.1

<wfs:GetFeature service=“WFS” version=“1.1.0”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“gsml:GeologicUnit”>

ogc:Filter

ogc:Intersects

ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>

gml:upperCorner143.50 -38</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

From: Stefano Costa [mailto:stefano.costa@…1107…]
Sent: Monday, September 14, 2015 3:39 PM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

please stay on the ML.

Your mapping looks a bit strange (at least to me):

  1. You’re mapping a geometry (aixm:Surface) as a feature

  2. You’re mapping the horizontalProjection property as a multi-valued property (true), but it’s not

  3. I was expecting a foreign key column in the GPS table, pointing to the G table: where is it? Is it true that g.id = gps.id, as your mapping suggests? So gps.id is both primary key of the gps table and foreing key referencing g.id?

  4. What type are the geometries stored in gps.longlat? The name of the column suggests you have points in there, but you’re mapping it to a gml:LinearRing

  5. This thread seems to confirm my doubts about types extending the base GML types (e.g. aixm:SurfaceType, which extends gml:SurfaceType): GeoServer uses statically defined Java bindings for all geometry types, so it is not comfortable with user-defined geometry types

On Mon, Sep 14, 2015 at 2:46 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Thanks, Stefano,

I can do BBOX query on surface if I make it a feature, but always got the error when query on it as a nested feature.

….

 
 
 

Best regards,
Stefano Costa
 
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
 
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
 
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.
 

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Hi Wen,
the error seems strange, do you have a full stack trace?

Are you using the same mapping you posted a few mails ago? Are you able to query nested non-geometry properties?

Two more questions:

  1. do I understand correctly that there is a 1:1 relationship between the GPS table and the G table? If that is the case, why not merge them into a single table, or at least create a view? That would save you from configuring feature chaining in app-schema…
  2. you are mapping a column containing point geometries (LONGLAT) to a gml:LinearRing geometry… that doesn’t seem right?

Regarding the issue with custom defined geometry types, derived from GML types (i.e. aixm:SurfaceType extending gml:SurfaceType), as suggested in the thread I already cited (http://osgeo-org.1560.x6.nabble.com/App-schema-How-to-map-Oracle-Geometry-into-GML-td4984781.html), you may need to provide your own custom bindings… something I’ve never tried myself.

···

On Wed, Sep 16, 2015 at 11:01 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Thanks! Stefano,

For AIXM, I always got an error like SimpleFeatureTypeImpl AIRSPACE identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

When using BBOX on nested feature even if the top feature Airspace is a FEATURE.

Wen

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Wednesday, September 16, 2015 4:53 PM

To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Glad to hear that :slight_smile:

However, I suspect there’s a bug somewhere, chaining on gml:name should have worked just as well: I’ll investigate and open a JIRA issue if necessary.

On Wed, Sep 16, 2015 at 9:01 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Stefano,

Thanks so much! This one works!

Wen

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Wednesday, September 16, 2015 2:14 PM

To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

did you try with the mapping configuration I attached to a previous e-mail?

In case you didn’t get the mail because of the attachment, I’ll copy-paste the relevant sections in the body of this mail.

gsml_GeologicUnit.xml:

datastore

gsml_GeologicUnit

gsml:GeologicUnit

gsml:GeologicUnit

ID

gml:description

DESCRIPTION

gml:name[1]

NAME

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitName’

gml:name[2]

CODE

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitCode’

gml:name[3]

URN

codeSpace

‘urn:x-test:classifierScheme:TestAuthority:GeologicUnitId’

gsml:occurrence

URN

gsml:MappedFeature

FEATURE_LINK

true

gsml_MappedFeature.xml:

datastore

gsml_MappedFeature

gsml:MappedFeature

gsml:MappedFeature

ID

gml:name[1]

NAME

gml:name[2]

GU_URN

FEATURE_LINK

GU_URN

gsml:specification

xlink:href

GU_URN

gsml:shape

SHAPE

gsml:observationMethod/gsml:CGI_TermValue/gsml:value

‘urn:ogc:def:nil:OGC:missing’

codeSpace

‘urn:ietf:rfc:2141’

gsml:positionalAccuracy

gsml:CGI_TermValuePropertyType

gsml:positionalAccuracy/gsml:CGI_TermValue/gsml:value

‘urn:ogc:def:nil:OGC:missing’

codeSpace

‘urn:ietf:rfc:2141’

What did the trick for me was to chain the two features using the special FEATURE_LINK attribute instead of gml:name (see highlighted sections).

I just tested the two requests below and they work for me:

WFS 2.0 with GML 3.1 output:

<?xml version="1.0" encoding="UTF-8"?>

<GetFeature service=“WFS” version=“2.0.0”

outputFormat=“gml3”

xmlns=“http://www.opengis.net/wfs/2.0

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:fes=“http://www.opengis.net/fes/2.0”>

fes:Filter

fes:BBOX

fes:ValueReferencegsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>–>

gml:upperCorner143.50 -38</gml:upperCorner>–>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

WFS 1.1:

<?xml version="1.0" encoding="utf-8"?>

<wfs:GetFeature service=“WFS” version=“1.1.0”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“gsml:GeologicUnit”>

ogc:Filter

ogc:Intersects

ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>

gml:upperCorner143.50 -38</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

Hope this helps.

On Wed, Sep 16, 2015 at 7:38 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Stefano,

I tried geometry filters on nested features on both WFS1.1 and WFS2.0, no record returned. But it does return records if the filter is applied to MappedFeature directly.

Is there any working sample available?

Thanks,

Wen


WFS 2.0

<?xml version="1.0" encoding="UTF-8"?>

<wfs:GetFeature service=“WFS” version=“2.0.0” xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:gml=“http://www.opengis.net/gml/3.2

xmlns:wfs=“http://www.opengis.net/wfs/2.0” xmlns:fes=“http://www.opengis.net/fes/2.0

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

xsi:schemaLocation="http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.opengis.net/wfs/2.0

http://schemas.opengis.net/wfs/2.0/wfs.xsd">

<wfs:Query typeNames=“gsml:GeologicUnit”>

fes:Filter

fes:BBOX

fes:ValueReference

gsml:occurrence/gsml:MappedFeature/gsml:shape</fes:ValueReference>

gml:Envelope

gml:lowerCorner-100 -100</gml:lowerCorner>

gml:upperCorner3000 3000</gml:upperCorner>

</gml:Envelope>

</fes:BBOX>

</fes:Filter>

</wfs:Query>

</wfs:GetFeature>


WFS 1.1

<wfs:GetFeature service=“WFS” version=“1.1.0”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“gsml:GeologicUnit”>

ogc:Filter

ogc:Intersects

ogc:PropertyNamegsml:occurrence/gsml:MappedFeature/gsml:shape</ogc:PropertyName>

gml:Envelope

gml:lowerCorner143.49 -39</gml:lowerCorner>

gml:upperCorner143.50 -38</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Monday, September 14, 2015 3:39 PM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

please stay on the ML.

Your mapping looks a bit strange (at least to me):

  1. You’re mapping a geometry (aixm:Surface) as a feature

  2. You’re mapping the horizontalProjection property as a multi-valued property (true), but it’s not

  3. I was expecting a foreign key column in the GPS table, pointing to the G table: where is it? Is it true that g.id = gps.id, as your mapping suggests? So gps.id is both primary key of the gps table and foreing key referencing g.id?

  4. What type are the geometries stored in gps.longlat? The name of the column suggests you have points in there, but you’re mapping it to a gml:LinearRing

  5. This thread seems to confirm my doubts about types extending the base GML types (e.g. aixm:SurfaceType, which extends gml:SurfaceType): GeoServer uses statically defined Java bindings for all geometry types, so it is not comfortable with user-defined geometry types

On Mon, Sep 14, 2015 at 2:46 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Thanks, Stefano,

I can do BBOX query on surface if I make it a feature, but always got the error when query on it as a nested feature.

….

 
 
 

Best regards,
Stefano Costa
 
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
 
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
 
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.
 

Best regards,
Stefano Costa
 
==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer
 
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
 
[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.
 

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Hi Stefano,

Yes, it is kind of stange. Everything works except geometry filter.

Are you using the same mapping you posted a few mails ago? Yes.

Are you able to query nested non-geometry properties? Yes.

Two more questions:

  1. do I understand correctly that there is a 1:1 relationship between the GPS table and the G table? If that is the case, why not merge them into a single table, or at least create a view? That would save you from configuring feature chaining in app-schema…

It’s one to many relationship. Table A → Bs, B->Cs and C->Ds …, and the geometry is in D. Not sure if it will work if everything in one VERY big table.

  1. you are mapping a column containing point geometries (LONGLAT) to a gml:LinearRing geometry… that doesn’t seem right?

It doesn’t seem right, but it works if do BBOX on this ‘feature’ alone.

Regarding the issue with custom defined geometry types, derived from GML types (i.e. aixm:SurfaceType extending gml:SurfaceType), as suggested in the thread I already cited (http://osgeo-org.1560.x6.nabble.com/App-schema-How-to-map-Oracle-Geometry-into-GML-td4984781.html), you may need to provide your own custom bindings… something I’ve never tried myself.

Here is the stack trace:

17 Sep 12:12:00 INFO [org.geotools.referencing.factory] - Disposing class org.vfny.geoserver.crs.GeoserverCustomWKTFactory backing store

17 Sep 12:12:00 INFO [org.geotools.referencing.factory] - Disposing class org.vfny.geoserver.crs.GeoserverOverridingWKTFactory backing store

17 Sep 12:24:19 INFO [org.geoserver.wfs] -

Request: getServiceInfo

17 Sep 12:24:19 DEBUG [org.geotools.xml] - No schemaLocation found, using 'http://www.opengis.net/wfs/2.0 jar:file:/C:/Users/J44571/.m2/repository/org/geotools/xsd/gt-xsd-wfs/15-SNAPSHOT/gt-xsd-wfs-15-SNAPSHOT.jar!/org/geotools/wfs/v2_0/wfs.xsd

17 Sep 12:24:19 DEBUG [org.geotools.xml] - Found override for http://www.opengis.net/wfs/2.0: jar:file:/C:/Users/J44571/.m2/repository/org/geotools/xsd/gt-xsd-wfs/15-SNAPSHOT/gt-xsd-wfs-15-SNAPSHOT.jar!/org/geotools/wfs/v2_0/wfs.xsd ==> jar:file:/C:/Users/J44571/.m2/repository/org/geotools/xsd/gt-xsd-wfs/15-SNAPSHOT/gt-xsd-wfs-15-SNAPSHOT.jar!/org/geotools/wfs/v2_0/wfs.xsd

17 Sep 12:24:27 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)

17 Sep 12:24:27 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.

17 Sep 12:24:34 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)

17 Sep 12:24:34 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.

17 Sep 12:24:37 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)

17 Sep 12:24:37 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.

17 Sep 12:24:38 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)

17 Sep 12:24:38 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.

17 Sep 12:36:12 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.

17 Sep 12:36:15 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS only.

17 Sep 12:36:18 DEBUG [org.geotools.xml] - [ class org.geotools.geometry.jts.LiteCoordinateSequence ] is not of type class [Ljava.lang.Double;

17 Sep 12:43:37 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.

17 Sep 12:43:37 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS only.

17 Sep 12:43:37 DEBUG [org.geotools.xml] - [ class org.geotools.geometry.jts.LiteCoordinateSequence ] is not of type class [Ljava.lang.Double;

17 Sep 13:03:39 INFO [org.geoserver.wfs] -

Request: getFeature

service = WFS

version = 2.0.0

baseUrl = http://localhost:8080/geoserver/

outputFormat = gml3

resolve = none

resolveDepth = *

resolveTimeout = 300

resultType = results

abstractQueryExpressionGroup[0] = wfs:abstractQueryExpression=net.opengis.wfs20.impl.QueryTypeImpl@…7249… (handle: null) (abstractProjectionClause: null, abstractSelectionClause: [

aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:geometryComponent/aixm:AirspaceGeometryComponent/aixm:theAirspaceVolume/aixm:AirspaceVolume/aixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing bbox POLYGON ((33.49 -99, 33.49 -78, 55.59 -78, 55.59 -99, 33.49 -99)) ], abstractSortingClause: null, aliases: null, typeNames: [{http://www.aixm.aero/schema/5.1}Airspace]) (featureVersion: null, srsName: null, filter: null, propertyNames: null, sortBy: null)

abstractQueryExpression[0]:

abstractSelectionClause = [

aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:geometryComponent/aixm:AirspaceGeometryComponent/aixm:theAirspaceVolume/aixm:AirspaceVolume/aixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing bbox POLYGON ((33.49 -99, 33.49 -78, 55.59 -78, 55.59 -99, 33.49 -99)) ]

typeNames[0] = {http://www.aixm.aero/schema/5.1}Airspace

filter = [

aixm:timeSlice/aixm:AirspaceTimeSlice/aixm:geometryComponent/aixm:AirspaceGeometryComponent/aixm:theAirspaceVolume/aixm:AirspaceVolume/aixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing bbox POLYGON ((33.49 -99, 33.49 -78, 55.59 -78, 55.59 -99, 33.49 -99)) ]

17 Sep 13:03:42 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only.

17 Sep 13:03:42 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS only.

17 Sep 13:04:21 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)

17 Sep 13:04:21 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.

17 Sep 13:04:32 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)

17 Sep 13:04:32 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.

17 Sep 13:04:32 TRACE [org.geotools.factory] - ENTRY (GeometryFactory, JTS_GEOMETRY_FACTORY)

17 Sep 13:04:32 TRACE [org.geotools.factory] - RETURN (GeometryFactory, JTS_GEOMETRY_FACTORY): found implementation GeometryFactory.

17 Sep 13:04:35 DEBUG [org.geotools.jdbc] - CREATE CONNECTION

17 Sep 13:04:38 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION

17 Sep 13:04:38 ERROR [org.geoserver.ows] -

java.lang.RuntimeException: java.io.IOException

at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:176)

at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:58)

at org.geotools.data.complex.DataAccessMappingFeatureIterator.initialiseSourceFeatures(DataAccessMappingFeatureIterator.java:397)

at org.geotools.data.complex.AbstractMappingFeatureIterator.(AbstractMappingFeatureIterator.java:230)

at org.geotools.data.complex.DataAccessMappingFeatureIterator.(DataAccessMappingFeatureIterator.java:141)

at org.geotools.data.complex.MappingFeatureIteratorFactory.getInstance(MappingFeatureIteratorFactory.java:222)

at org.geotools.data.complex.MappingFeatureCollection.features(MappingFeatureCollection.java:173)

at org.geotools.xml.Encoder.encode(Encoder.java:1056)

at org.geotools.xml.Encoder.encode(Encoder.java:609)

at org.geoserver.wfs.xml.GML3OutputFormat.encode(GML3OutputFormat.java:302)

at org.geoserver.wfs.xml.GML3OutputFormat.complexFeatureStreamIntercept(GML3OutputFormat.java:325)

at org.geoserver.wfs.xml.GML3OutputFormat.write(GML3OutputFormat.java:277)

at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutputFormat.java:196)

at org.geoserver.ows.Dispatcher.response(Dispatcher.java:996)

at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:279)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)

at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:83)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:87)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:48)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Caused by: java.io.IOException

at org.geotools.jdbc.JoiningJDBCFeatureSource.getJoiningReaderInternal(JoiningJDBCFeatureSource.java:933)

at org.geotools.jdbc.JoiningJDBCFeatureSource.getReaderInternal(JoiningJDBCFeatureSource.java:941)

at org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:634)

at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:173)

… 89 more

Caused by: java.lang.UnsupportedOperationException: Expecting a feature to apply filter, but found: SimpleFeatureTypeImpl A_AIRSPACE_WT identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

at org.geotools.filter.NestedAttributeExpression.evaluate(NestedAttributeExpression.java:90)

at org.geotools.data.jdbc.FilterToSQL.visitBinarySpatialOperator(FilterToSQL.java:1001)

at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:936)

at org.geotools.filter.spatial.BBOXImpl.accept(BBOXImpl.java:220)

at org.geotools.data.jdbc.FilterToSQL.encode(FilterToSQL.java:248)

at org.geotools.data.jdbc.FilterToSQL.encodeToString(FilterToSQL.java:277)

at org.geotools.jdbc.JoiningJDBCFeatureSource.selectSQL(JoiningJDBCFeatureSource.java:601)

at org.geotools.jdbc.JoiningJDBCFeatureSource.selectSQLPS(JoiningJDBCFeatureSource.java:792)

at org.geotools.jdbc.JoiningJDBCFeatureSource.getJoiningReaderInternal(JoiningJDBCFeatureSource.java:920)

… 92 more

Thanks,

Wen

···

Hi Wen,

the error seems strange, do you have a full stack trace?

Are you using the same mapping you posted a few mails ago? Are you able to query nested non-geometry properties?

Two more questions:

  1. do I understand correctly that there is a 1:1 relationship between the GPS table and the G table? If that is the case, why not merge them into a single table, or at least create a view? That would save you from configuring feature chaining in app-schema…

  2. you are mapping a column containing point geometries (LONGLAT) to a gml:LinearRing geometry… that doesn’t seem right?

Regarding the issue with custom defined geometry types, derived from GML types (i.e. aixm:SurfaceType extending gml:SurfaceType), as suggested in the thread I already cited (http://osgeo-org.1560.x6.nabble.com/App-schema-How-to-map-Oracle-Geometry-into-GML-td4984781.html), you may need to provide your own custom bindings… something I’ve never tried myself.

On Wed, Sep 16, 2015 at 11:01 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Thanks! Stefano,

For AIXM, I always got an error like SimpleFeatureTypeImpl AIRSPACE identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

When using BBOX on nested feature even if the top feature Airspace is a FEATURE.

Wen


Hi Wen,

···

On Thu, Sep 17, 2015 at 7:19 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Are you using the same mapping you posted a few mails ago? Yes.

Uhm, you posted the mapping files for two feature types, aixm:AirspaceVolume and aixm:Surface, but below you’re mentioning 4 tables / feature types… from the BBOX filter expression, I guess you’re mapping also aixm:Airspace and aixm:AirspaceGeometryComponent? Can you post the missing mapping files?

Are you able to query nested non-geometry properties? Yes.

Can you post an example of working query?

Caused by: java.lang.UnsupportedOperationException: Expecting a feature to apply filter, but found: SimpleFeatureTypeImpl A_AIRSPACE_WT identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

Looks like you got a FeatureType, but the code was expecting a Feature… this may be a bug. What type are you mapping the table A_AIRSPACE_WT to? aixm:Airspace?

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Hi Stefano,

I just tested the GeologicUnit sample you sent two days ago. I changed the datastore from property file to oracle, now I got the same error when using the same bbox filter:

java.lang.RuntimeException: java.io.IOException java.io.IOExceptionExpecting a feature to apply filter, but found: SimpleFeatureTypeImpl GEOLOGICUNIT identified extends Feature(ID:ID,NAME:NAME,CODE:CODE,GU_URN:GU_URN,DESCRIPTION:DESCRIPTION)

Here are the scripts to create the datastore in case you need to replicate the error:

CREATE TABLE MappedFeature (ID VARCHAR2(10), NAME VARCHAR2(20),GU_URN VARCHAR2(100),SHAPE MDSYS.SDO_GEOMETRY);

CREATE TABLE GEOLOGICUNIT (ID VARCHAR2(10), NAME VARCHAR2(30), CODE VARCHAR2(20),URN VARCHAR2(100),DESCRIPTION VARCHAR2(300));

INSERT INTO MappedFeature VALUES (‘mf.25699’,‘Some basalt’,‘urn:x-test:GeologicUnit:16777549126931093’,

SDO_GEOMETRY(2003, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY( 143.561948, -38.532217, 143.561012, -38.533360, 143.549986, -38.526470, 143.561948, -38.532217)));

INSERT INTO MappedFeature VALUES (‘mf.25764’,‘More basalt’,‘urn:x-test:GeologicUnit:16777549126931093’,

SDO_GEOMETRY(2003, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(143.566412, -38.492157, 143.569803, -38.488559, 143.571572, -38.486718, 143.566412, -38.492157)));

INSERT INTO MappedFeature VALUES (‘mf.26106’,‘Some mudstone’,‘urn:x-test:GeologicUnit:16777549126931077’,

SDO_GEOMETRY(2003, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(143.496091 -38.800309, 143.496241 -38.799286, 143.496136 -38.797775, 143.497646 -38.800192, 143.496091 -38.800309)));

INSERT INTO GEOLOGICUNIT VALUES (‘gu.93’,‘Yaugher Volcanic Group’,‘-Py’,‘urn:x-test:GeologicUnit:16777549126931093’,‘Olivine basalt, tuff, microgabbro, minor sedimentary rocks’)

INSERT INTO GEOLOGICUNIT VALUES (‘gu.77’,‘Narrawaturk Marl’,‘-Pnn’,‘urn:x-test:GeologicUnit:16777549126931077’,‘Calcareous mudstone, minor thin calcarenite beds: locally carbonaceous and burrowed, locally abundant glauconite pellets and polished quartz sand, foraminifers, bryozoans, brachiopods and molluscs; open marine (below storm wave base) deposits’)

Thanks for helping!

Wen

···

Hi Wen,

On Thu, Sep 17, 2015 at 7:19 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Are you using the same mapping you posted a few mails ago? Yes.

Uhm, you posted the mapping files for two feature types, aixm:AirspaceVolume and aixm:Surface, but below you’re mentioning 4 tables / feature types… from the BBOX filter expression, I guess you’re mapping also aixm:Airspace and aixm:AirspaceGeometryComponent? Can you post the missing mapping files?

Are you able to query nested non-geometry properties? Yes.

Can you post an example of working query?

Caused by: java.lang.UnsupportedOperationException: Expecting a feature to apply filter, but found: SimpleFeatureTypeImpl A_AIRSPACE_WT identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

Looks like you got a FeatureType, but the code was expecting a Feature… this may be a bug. What type are you mapping the table A_AIRSPACE_WT to? aixm:Airspace?

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Hi Wen,
I was about to write, you anticipated me :slight_smile:

I was able to replicate the error using PostGIS as datastore. This is definitely a bug. It seems the issue occurs when one uses a BBOX filter (WFS 2.0) against a nested property. I’ll open a JIRA ticket.

Meanwhile, you could try with a WFS 1.1 filter:

<wfs:GetFeature service=“WFS” version=“1.1.0”
outputFormat=“text/xml; subtype=gml/3.2”
xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”
xmlns:wfs=“http://www.opengis.net/wfs
xmlns:ogc=“http://www.opengis.net/ogc
xmlns:gml=“http://www.opengis.net/gml”>
<wfs:Query typeName=“aixm:AirspaceVolume”>
ogc:Filter
ogc:Intersects
ogc:PropertyNameaixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing</ogc:PropertyName>
gml:Envelope
gml:lowerCorner-180 -90</gml:lowerCorner>
gml:upperCorner180 90</gml:upperCorner>
</gml:Envelope>
</ogc:Intersects>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

Probably you will get no feature back, but at least you should get no exception :slight_smile:

–S

···

On Fri, Sep 18, 2015 at 3:25 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Hi Stefano,

I just tested the GeologicUnit sample you sent two days ago. I changed the datastore from property file to oracle, now I got the same error when using the same bbox filter:

java.lang.RuntimeException: java.io.IOException java.io.IOExceptionExpecting a feature to apply filter, but found: SimpleFeatureTypeImpl GEOLOGICUNIT identified extends Feature(ID:ID,NAME:NAME,CODE:CODE,GU_URN:GU_URN,DESCRIPTION:DESCRIPTION)

Here are the scripts to create the datastore in case you need to replicate the error:

CREATE TABLE MappedFeature (ID VARCHAR2(10), NAME VARCHAR2(20),GU_URN VARCHAR2(100),SHAPE MDSYS.SDO_GEOMETRY);

CREATE TABLE GEOLOGICUNIT (ID VARCHAR2(10), NAME VARCHAR2(30), CODE VARCHAR2(20),URN VARCHAR2(100),DESCRIPTION VARCHAR2(300));

INSERT INTO MappedFeature VALUES (‘mf.25699’,‘Some basalt’,‘urn:x-test:GeologicUnit:16777549126931093’,

SDO_GEOMETRY(2003, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY( 143.561948, -38.532217, 143.561012, -38.533360, 143.549986, -38.526470, 143.561948, -38.532217)));

INSERT INTO MappedFeature VALUES (‘mf.25764’,‘More basalt’,‘urn:x-test:GeologicUnit:16777549126931093’,

SDO_GEOMETRY(2003, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(143.566412, -38.492157, 143.569803, -38.488559, 143.571572, -38.486718, 143.566412, -38.492157)));

INSERT INTO MappedFeature VALUES (‘mf.26106’,‘Some mudstone’,‘urn:x-test:GeologicUnit:16777549126931077’,

SDO_GEOMETRY(2003, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(143.496091 -38.800309, 143.496241 -38.799286, 143.496136 -38.797775, 143.497646 -38.800192, 143.496091 -38.800309)));

INSERT INTO GEOLOGICUNIT VALUES (‘gu.93’,‘Yaugher Volcanic Group’,‘-Py’,‘urn:x-test:GeologicUnit:16777549126931093’,‘Olivine basalt, tuff, microgabbro, minor sedimentary rocks’)

INSERT INTO GEOLOGICUNIT VALUES (‘gu.77’,‘Narrawaturk Marl’,‘-Pnn’,‘urn:x-test:GeologicUnit:16777549126931077’,‘Calcareous mudstone, minor thin calcarenite beds: locally carbonaceous and burrowed, locally abundant glauconite pellets and polished quartz sand, foraminifers, bryozoans, brachiopods and molluscs; open marine (below storm wave base) deposits’)

Thanks for helping!

Wen

From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: Friday, September 18, 2015 9:01 AM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

On Thu, Sep 17, 2015 at 7:19 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@anonymised.com> wrote:

Are you using the same mapping you posted a few mails ago? Yes.

Uhm, you posted the mapping files for two feature types, aixm:AirspaceVolume and aixm:Surface, but below you’re mentioning 4 tables / feature types… from the BBOX filter expression, I guess you’re mapping also aixm:Airspace and aixm:AirspaceGeometryComponent? Can you post the missing mapping files?

Are you able to query nested non-geometry properties? Yes.

Can you post an example of working query?

Caused by: java.lang.UnsupportedOperationException: Expecting a feature to apply filter, but found: SimpleFeatureTypeImpl A_AIRSPACE_WT identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

Looks like you got a FeatureType, but the code was expecting a Feature… this may be a bug. What type are you mapping the table A_AIRSPACE_WT to? aixm:Airspace?

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.

Stefano,

Thanks for taking care of this. I tried WFS 1.1, yes, no error and no feature back. :slight_smile:

Best regards,

Wen

···

Hi Wen,

I was about to write, you anticipated me :slight_smile:

I was able to replicate the error using PostGIS as datastore. This is definitely a bug. It seems the issue occurs when one uses a BBOX filter (WFS 2.0) against a nested property. I’ll open a JIRA ticket.

Meanwhile, you could try with a WFS 1.1 filter:

<wfs:GetFeature service=“WFS” version=“1.1.0”

outputFormat=“text/xml; subtype=gml/3.2”

xmlns:gsml=“urn:cgi:xmlns:CGI:GeoSciML:2.0”

xmlns:wfs=“http://www.opengis.net/wfs

xmlns:ogc=“http://www.opengis.net/ogc

xmlns:gml=“http://www.opengis.net/gml”>

<wfs:Query typeName=“aixm:AirspaceVolume”>

ogc:Filter

ogc:Intersects

ogc:PropertyNameaixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing</ogc:PropertyName>

gml:Envelope

gml:lowerCorner-180 -90</gml:lowerCorner>

gml:upperCorner180 90</gml:upperCorner>

</gml:Envelope>

</ogc:Intersects>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

Probably you will get no feature back, but at least you should get no exception :slight_smile:

–S

On Fri, Sep 18, 2015 at 3:25 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Hi Stefano,

I just tested the GeologicUnit sample you sent two days ago. I changed the datastore from property file to oracle, now I got the same error when using the same bbox filter:

java.lang.RuntimeException: java.io.IOException java.io.IOExceptionExpecting a feature to apply filter, but found: SimpleFeatureTypeImpl GEOLOGICUNIT identified extends Feature(ID:ID,NAME:NAME,CODE:CODE,GU_URN:GU_URN,DESCRIPTION:DESCRIPTION)

Here are the scripts to create the datastore in case you need to replicate the error:

CREATE TABLE MappedFeature (ID VARCHAR2(10), NAME VARCHAR2(20),GU_URN VARCHAR2(100),SHAPE MDSYS.SDO_GEOMETRY);

CREATE TABLE GEOLOGICUNIT (ID VARCHAR2(10), NAME VARCHAR2(30), CODE VARCHAR2(20),URN VARCHAR2(100),DESCRIPTION VARCHAR2(300));

INSERT INTO MappedFeature VALUES (‘mf.25699’,‘Some basalt’,‘urn:x-test:GeologicUnit:16777549126931093’,

SDO_GEOMETRY(2003, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY( 143.561948, -38.532217, 143.561012, -38.533360, 143.549986, -38.526470, 143.561948, -38.532217)));

INSERT INTO MappedFeature VALUES (‘mf.25764’,‘More basalt’,‘urn:x-test:GeologicUnit:16777549126931093’,

SDO_GEOMETRY(2003, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(143.566412, -38.492157, 143.569803, -38.488559, 143.571572, -38.486718, 143.566412, -38.492157)));

INSERT INTO MappedFeature VALUES (‘mf.26106’,‘Some mudstone’,‘urn:x-test:GeologicUnit:16777549126931077’,

SDO_GEOMETRY(2003, 4283, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(143.496091 -38.800309, 143.496241 -38.799286, 143.496136 -38.797775, 143.497646 -38.800192, 143.496091 -38.800309)));

INSERT INTO GEOLOGICUNIT VALUES (‘gu.93’,‘Yaugher Volcanic Group’,‘-Py’,‘urn:x-test:GeologicUnit:16777549126931093’,‘Olivine basalt, tuff, microgabbro, minor sedimentary rocks’)

INSERT INTO GEOLOGICUNIT VALUES (‘gu.77’,‘Narrawaturk Marl’,‘-Pnn’,‘urn:x-test:GeologicUnit:16777549126931077’,‘Calcareous mudstone, minor thin calcarenite beds: locally carbonaceous and burrowed, locally abundant glauconite pellets and polished quartz sand, foraminifers, bryozoans, brachiopods and molluscs; open marine (below storm wave base) deposits’)

Thanks for helping!

Wen

From: Stefano Costa [mailto:stefano.costa@…1107…]
Sent: Friday, September 18, 2015 9:01 AM
To: Yin, Wentao (IS) (Contr)
Cc: geoserver-users
Subject: Re: EXT :Re: [Geoserver-users] BBOX filter on chained features

Hi Wen,

On Thu, Sep 17, 2015 at 7:19 PM, Yin, Wentao (IS) (Contr) <Wentao.Yin@…508…> wrote:

Are you using the same mapping you posted a few mails ago? Yes.

Uhm, you posted the mapping files for two feature types, aixm:AirspaceVolume and aixm:Surface, but below you’re mentioning 4 tables / feature types… from the BBOX filter expression, I guess you’re mapping also aixm:Airspace and aixm:AirspaceGeometryComponent? Can you post the missing mapping files?

Are you able to query nested non-geometry properties? Yes.

Can you post an example of working query?

Caused by: java.lang.UnsupportedOperationException: Expecting a feature to apply filter, but found: SimpleFeatureTypeImpl A_AIRSPACE_WT identified extends Feature(UUID:UUID,CODESPACE:CODESPACE,REC_ID:REC_ID)

Looks like you got a FeatureType, but the code was expecting a Feature… this may be a bug. What type are you mapping the table A_AIRSPACE_WT to? aixm:Airspace?

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.