Hi Wen, I was about to write, you anticipated me :-) 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:PropertyName>aixm:horizontalProjection/aixm:Surface/gml:polygonPatches/gml:PolygonPatch/gml:exterior/gml:LinearRing</ogc:PropertyName> <gml:Envelope> <gml:lowerCorner>-180 -90</gml:lowerCorner> <gml:upperCorner>180 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 :-) --S On Fri, Sep 18, 2015 at 3:25 PM, Yin, Wentao (IS) (Contr) < [email protected]> 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:[email protected]] > *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) < > [email protected]> 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! 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.
------------------------------------------------------------------------------
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
