APOLLO & ECW/JP2 Discussions

Wondering how others have configured their ERDAS APOLLO server or what data they are crawling? The ERDAS APOLLO Discussion board is a place to find information, share ideas and more. Join the community, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
New Contributor
Posts: 2
Registered: ‎11-05-2020
Accepted Solution

Apollo WFS with more than one Filter operator not working

[ Edited ]

Hi,

I am new at the community and have a question on Apollo Vector Services.

Is it possible to send more than one filter to the WFS?

I tried it with GET Requests and got the following Error.

"The filter can contain only one operator."

For GIS test: Add a Apollo WFS to GeoMedia (i have tested with Apollo2016 as well as Apollo2020), define a spatial filter and try to create an Attribute Query. I get an error in GeoMedia and the Message above is in Tomcat log.

 

This request works.

https://demo-apollo.hexagongeospatial.com:443/erdas-apollo/vector/CHEROKEESHP?SERVICE=WFS&format=GML2&VERSION=1.1.1&REQUEST=GetFeature&TYPENAME=iwfs:Buildings&SRS=EPSG:2240&FILTER=<Filter><ogc:And><PropertyIsEqualTo><PropertyName>Id</PropertyName><Literal>8758</Literal></PropertyIsEqualTo></ogc:And></Filter>

Also this works.

https://demo-apollo.hexagongeospatial.com:443/erdas-apollo/vector/CHEROKEESHP?SERVICE=WFS&format=GML2&VERSION=1.1.1&REQUEST=GetFeature&TYPENAME=iwfs:Buildings&SRS=EPSG:2240&FILTER=<Filter><ogc:And><ogc:BBOX><ogc:PropertyName>GEOMETRY</ogc:PropertyName><gml:Envelope srsName="EPSG:2240"><gml:lowerCorner>2204800 1507800</gml:lowerCorner><gml:upperCorner>2204900 1507900</gml:upperCorner></gml:Envelope></ogc:BBOX></ogc:And></Filter>

But the combination of both requests generate the error.

https://demo-apollo.hexagongeospatial.com:443/erdas-apollo/vector/CHEROKEESHP?SERVICE=WFS&format=GML2&VERSION=1.1.1&REQUEST=GetFeature&TYPENAME=iwfs:Buildings&SRS=EPSG:2240&FILTER=<Filter><ogc:And><ogc:BBOX><ogc:PropertyName>GEOMETRY</ogc:PropertyName><gml:Envelope srsName="EPSG:2240"><gml:lowerCorner>2204800 1507800</gml:lowerCorner><gml:upperCorner>2204900 1507900</gml:upperCorner></gml:Envelope></ogc:BBOX></ogc:And><ogc:And><PropertyIsEqualTo><PropertyName>Id</PropertyName><Literal>8758</Literal></PropertyIsEqualTo></ogc:And></Filter>

 

The TOMCAT-server.log is this

WARN (ajp-nio-127.0.0.1-8009-exec-15)[com.ionicsoft.wfs.server.GetFeatureProcessor] Error in WFS GetFeature Request processing. ServiceException.
com.ionicsoft.api.wfs.WFSLanguageException: (Error.FilterOneOperatorAllowed)The filter can contain only one operator.
at com.ionicsoft.wfs.ErrorUtil.createError(ErrorUtil.java:197)
at com.ionicsoft.wfs.ErrorUtil.throwError(ErrorUtil.java:217)
at com.ionicsoft.wfs.ErrorUtil.throwError(ErrorUtil.java:108)
at com.ionicsoft.wfs.sql.XMLFilterBuilder$FilterOperator.translateNode(XMLFilterBuilder.java:1744)
at com.ionicsoft.wfs.sql.XMLFilterBuilder.translateFilter(XMLFilterBuilder.java:297)
at com.ionicsoft.wfs.sql.XMLFilterBuilder.translateFilter(XMLFilterBuilder.java:285)
at com.ionicsoft.wfs.sql.XMLFilterBuilder.translateOneNode(XMLFilterBuilder.java:318)
at com.ionicsoft.wfs.sql.BaseXMLFilterBuilder.translateFilterPart(BaseXMLFilterBuilder.java:478)
at com.ionicsoft.wfs.sql.BaseXMLFilterBuilder.translateFilterPart(BaseXMLFilterBuilder.java:459)
at com.ionicsoft.wfs.sql.FilterBuilder.translateFilterPart(FilterBuilder.java:1408)
at com.ionicsoft.wfs.sql.BaseXMLFilterBuilder.translateFilterPart(BaseXMLFilterBuilder.java:399)
at com.ionicsoft.wfs.sql.FilterBuilder.translateFilterPart(FilterBuilder.java:1423)
at com.ionicsoft.wfs.server.FeatureGenerator.serialize(FeatureGenerator.java:1235)
at com.ionicsoft.wfs.server.FeatureGenerator.serializeCollection(FeatureGenerator.java:1757)
at com.ionicsoft.wfs.server.GetFeatureProcessor.performComputation(GetFeatureProcessor.java:761)
at com.ionicsoft.wfs.server.GetFeatureProcessor.process(GetFeatureProcessor.java:681)
at com.ionicsoft.wfs.server.BaseFeatureProcessor.computeResponse(BaseFeatureProcessor.java:66)
at com.ionicsoft.servlet.MethodServlet.doGetPost(MethodServlet.java:534)
at com.ionicsoft.servlet.MethodServlet.doGet(MethodServlet.java:337)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:649)
at com.ionicsoft.servlet.BaseServlet.service(BaseServlet.java:911)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:207)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:364)
at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:170)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:479)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)

 

Any idea?

Technical Evangelist
Posts: 1,405
Registered: ‎09-11-2015

Re: Apollo WFS with more than one Filter operator not working

[ Edited ]

Hi TMS,

 

Your OGC Filter is wrong - the two operands that you want to pair are supposed to be in a single <And> operator. After modifying your request like below, the filter works

 

https://demo-apollo.hexagongeospatial.com/erdas-apollo/vector/CHEROKEESHP?SERVICE=WFS&format=GML2&VERSION=1.1.1&REQUEST=GetFeature&TYPENAME=iwfs:Buildings&SRS=EPSG:2240&FILTER=<Filter><ogc:And><ogc:BBOX><ogc:PropertyName>GEOMETRY</ogc:PropertyName><gml:Envelope srsName="EPSG:2240"><gml:lowerCorner>2204800 1507800</gml:lowerCorner><gml:upperCorner>2204900 1507900</gml:upperCorner></gml:Envelope></ogc:BBOX><PropertyIsEqualTo><PropertyName>Id</PropertyName><Literal>8758</Literal></PropertyIsEqualTo></ogc:And></Filter>

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

New Contributor
Posts: 2
Registered: ‎11-05-2020

Re: Apollo WFS with more than one Filter operator not working

Hi Jan,

 

perfect and thank you very much.

Can you also explain what is wrong with the request from Geomedia?

 

Best Regards,

Lars

 

Technical Evangelist
Posts: 1,405
Registered: ‎09-11-2015

Re: Apollo WFS with more than one Filter operator not working

Hi Lars,

 

If the problematic request came from GeoMedia, then I'd suspect GeoMedia constructing the Filter incorrectly. You may want to open a support ticket and have it inspected. Perhaps it could be a bug in GeoMedia WFS data server.

 

Thanks,

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial