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