It could well be related to the one I stumbled over looking at
https://osgeo-org.atlassian.net/browse/GEOT-6310 - where some of the
filters are applied before and some after the counting.

I thought I opened a ticket against ContentDataStore but I can't find it now

Ian

On Tue, 23 Jul 2019 at 13:59, Andrea Aime <[email protected]>
wrote:

> Sounds like an issue indeed, possibly in the machinery that's running
> count queries....
> are you using a recent version of GeoServer (something released in the
> last few months)?
> If so, please open a report at
> http://osgeo-org.atlassian.net/projects/GEOS with a sample
> dataset and a sample request that will show the problem.
> If not, please try a newer version of GeoServer, and report only if the
> issue is still there
>
> Cheers
> Andrea
>
>
> On Thu, Jul 18, 2019 at 10:51 PM José Carlos Martínez Llario <
> [email protected]> wrote:
>
>> Hi, Maybe I found a bug trying MapStore with Geoserver.
>>
>> The layer is using a Geopackage datastore. MapStore is using this WFS
>> Query to show a widget:
>>
>> <wfs:GetFeature service="WFS" version="1.1.0"
>> xmlns:gml="http://www.opengis.net/gml";
>> xmlns:wfs="http://www.opengis.net/wfs";
>> xmlns:ogc="http://www.opengis.net/ogc";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xsi:schemaLocation="http://www.opengis.net/wfs
>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"; startIndex="0"
>> maxFeatures="40"><wfs:Query typeName="buildings"
>> srsName="EPSG:4326"><ogc:PropertyName>currentUse</ogc:PropertyName><ogc:PropertyName>value</ogc:PropertyName><ogc:PropertyName>gml_id</ogc:PropertyName><ogc:Filter><ogc:And><ogc:Intersects><ogc:PropertyName>geom</ogc:PropertyName><gml:Polygon
>>
>> srsName="EPSG:3857"><gml:exterior><gml:LinearRing><gml:posList>-404523.862942224
>>
>> 4593261.069684201 -404523.862942224 4594677.543364611
>> -403334.31168953597 4594677.543364611 -403334.31168953597
>> 4593261.069684201 -404523.862942224
>>
>> 4593261.069684201</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogc:Intersects></ogc:And></ogc:Filter></wfs:Query></wfs:GetFeature>
>>
>>
>> Then the result is this one:
>>
>>
>>
>> {"type":"FeatureCollection","features":[{"type":"Feature","id":"buildings.5904","geometry":null,"properties":{"gml_id":"ES.SDGC.BU.4475910VH4147N","currentUse":"1_residential","value":112}},{"type":"Feature","id":"buildings.5905","geometry":null,"properties":{"gml_id":"ES.SDGC.BU.4475911VH4147N","currentUse":"1_residential","value":109}}],"totalFeatures":0,"numberMatched":0,"numberReturned":2,"timeStamp":"2019-07-18T17:04:12.487Z","crs":null}
>>
>>
>> AS you can see and the end of the response:  the  the number of matched
>> features is 0 but the returned features are 2 which does not make sense.
>> The same layer with a shape datastore is working properly.
>>
>> could be related with the name of the geometry column (geom in
>> geopackage and the_geom is shapefile).
>>
>>
>> IF I change the query to show the geom field then is working
>> (totalFeatures":840,"numberMatched":840,"numberReturned":2)
>>
>>
>> <wfs:GetFeature service="WFS" version="1.1.0"
>> xmlns:gml="http://www.opengis.net/gml";
>> xmlns:wfs="http://www.opengis.net/wfs";
>> xmlns:ogc="http://www.opengis.net/ogc";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xsi:schemaLocation="http://www.opengis.net/wfs
>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"; startIndex="0"
>> maxFeatures="2"><wfs:Query typeName="buildings"
>> srsName="EPSG:4326"><ogc:PropertyName>currentUse</ogc:PropertyName><ogc:PropertyName>value</ogc:PropertyName><ogc:PropertyName>gml_id</ogc:PropertyName><ogc:PropertyName>geom</ogc:PropertyName><ogc:Filter><ogc:And><ogc:Intersects><ogc:PropertyName>geom</ogc:PropertyName><gml:Polygon
>>
>> srsName="EPSG:3857"><gml:exterior><gml:LinearRing><gml:posList>-404523.862942224
>>
>> 4593261.069684201 -404523.862942224 4594677.543364611
>> -403334.31168953597 4594677.543364611 -403334.31168953597
>> 4593261.069684201 -404523.862942224
>>
>> 4593261.069684201</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogc:Intersects></ogc:And></ogc:Filter></wfs:Query></wfs:GetFeature>
>>
>>
>>
>> {"type":"FeatureCollection","features":[{"type":"Feature","id":"buildings.5904","geometry":{"type":"Polygon","coordinates":[[[-3.63393641,38.10173674],[-3.63389626,38.10176129],[-3.63385407,38.10171789],[-3.63385396,38.1017178],[-3.63385897,38.10171535],[-3.63386869,38.10171041],[-3.63389273,38.10169517],[-3.63392517,38.10167462],[-3.63392677,38.10168089],[-3.63396561,38.10171744],[-3.63396572,38.10171754],[-3.63396664,38.10171825],[-3.63393641,38.10173674]]]},"geometry_name":"geom","properties":{"gml_id":"ES.SDGC.BU.4475910VH4147N","currentUse":"1_residential","value":112}},{"type":"Feature","id":"buildings.5905","geometry":{"type":"Polygon","coordinates":[[[-3.63389006,38.10169687],[-3.63386869,38.10171041],[-3.63385897,38.10171535],[-3.63384522,38.10169769],[-3.63383084,38.10167921],[-3.6338741,38.10166474],[-3.6338442,38.10161563],[-3.63389646,38.10159708],[-3.63391303,38.10162686],[-3.63392517,38.10167462],[-3.63389006,38.10169687]]]},"geometry_name":"geom","properties":{"gml_id":"ES.SDGC.BU.4475911VH4147N","currentUse":"1_residential","value":109}}],"totalFeatures":840,"numberMatched":840,"numberReturned":2,"timeStamp":"2019-07-18T17:05:50.507Z","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}}}
>>
>> Cheers,
>>
>> Jose
>>
>>
>>
>>
>> --
>> ------------------------------
>> José Carlos Martínez Llario
>> http://www.upv.es/ficha-personal/jomarlla
>> https://cartosig.webs.upv.es
>>
>> Producción Cartográfica y SIG.
>> Dpto. Ingeniería Cartográfica.
>> Univ. Politécnica de Valencia.
>> ------------------------------
>>
>>
>>
>>
>> _______________________________________________
>> Geoserver-users mailing list
>>
>> Please make sure you read the following two resources before posting to
>> this list:
>> - Earning your support instead of buying it, but Ian Turton:
>> http://www.ianturton.com/talks/foss4g.html#/
>> - The GeoServer user list posting guidelines:
>> http://geoserver.org/comm/userlist-guidelines.html
>>
>> If you want to request a feature or an improvement, also see this:
>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>>
>>
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
>
> --
>
> Regards, Andrea Aime == GeoServer Professional Services from the experts!
> Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime
> @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054
> Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339
> 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it
> ------------------------------------------------------- *Con riferimento
> alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
> Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
> circostanza inerente alla presente email (il suo contenuto, gli eventuali
> allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
> destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
> errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
> sarei comunque grato se potesse darmene notizia. This email is intended
> only for the person or entity to which it is addressed and may contain
> information that is privileged, confidential or otherwise protected from
> disclosure. We remind that - as provided by European Regulation 2016/679
> “GDPR” - copying, dissemination or use of this e-mail or the information
> herein by anyone other than the intended recipient is prohibited. If you
> have received this email by mistake, please notify us immediately by
> telephone or e-mail.*
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 
Ian Turton
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


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

Reply via email to