[Geoserver-devel] [JIRA] (GEOS-8593) WFS with startIndex doesn't return some results

Lorenzo Natali created an issue

GeoServer / BugGEOS-8593

WFS with startIndex doesn’t return some results

Issue Type:

BugBug

Affects Versions:

2.12.2

Assignee:

Unassigned

Created:

21/Feb/18 12:51 PM

Priority:

MediumMedium

Reporter:

Lorenzo Natali

With tiger:roads layer WFS GetFeature can’t return features over index 8008.
Any GetFeature Request that includes features at index >= 8008 does not return features over that index.
E.g. a request with startIndex=“8000” return 8 results.

curl -X POST \
  'http://localhost:8080/geoserver/wfs?service=WFS' \
  -H 'accept: application/json' \
  -H 'accept-encoding: gzip, deflate, br' \
  -H 'accept-language: it' \
  -H 'cache-control: no-cache' \
  -H 'connection: keep-alive' \
  -H 'content-type: application/json' \
  -H 'origin: http://localhost:8081' \
  -H 'pragma: no-cache' \
  -H 'referer: http://localhost:8081/?debug=true' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36' \
  -d '<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="8000" maxFeatures="80"><wfs:Query typeName="tiger:tiger_roads" srsName="EPSG:4326"><wfs:PropertyName>NAME</wfs:PropertyName><wfs:PropertyName>CFCC</wfs:PropertyName><ogc:Filter><ogc:And></ogc:And></ogc:Filter></wfs:Query></wfs:GetFeature>'

response:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:tiger="http://www.census.gov" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" numberOfFeatures="80" timeStamp="2018-02-21T11:31:52.138Z" xsi:schemaLocation="http://www.census.gov http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=tiger%3Atiger_roads http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd">
    <gml:featureMembers>
        <tiger:tiger_roads gml:id="tiger_roads.992">
            <tiger:CFCC>A41</tiger:CFCC>
            <tiger:NAME>W 175th St</tiger:NAME>
        </tiger:tiger_roads>
        <tiger:tiger_roads gml:id="tiger_roads.993">
            <tiger:CFCC>A41</tiger:CFCC>
            <tiger:NAME>W 184th St</tiger:NAME>
        </tiger:tiger_roads>
        <tiger:tiger_roads gml:id="tiger_roads.994">
            <tiger:CFCC>A41</tiger:CFCC>
            <tiger:NAME>W 189th St</tiger:NAME>
        </tiger:tiger_roads>
        <tiger:tiger_roads gml:id="tiger_roads.995">
            <tiger:CFCC>A41</tiger:CFCC>
            <tiger:NAME>W 186th St</tiger:NAME>
        </tiger:tiger_roads>
        <tiger:tiger_roads gml:id="tiger_roads.996">
            <tiger:CFCC>A41</tiger:CFCC>
            <tiger:NAME>W 187th St</tiger:NAME>
        </tiger:tiger_roads>
        <tiger:tiger_roads gml:id="tiger_roads.997">
            <tiger:CFCC>A41</tiger:CFCC>
            <tiger:NAME>W 186th St</tiger:NAME>
        </tiger:tiger_roads>
        <tiger:tiger_roads gml:id="tiger_roads.998">
            <tiger:CFCC>A41</tiger:CFCC>
            <tiger:NAME>W 184th St</tiger:NAME>
        </tiger:tiger_roads>
        <tiger:tiger_roads gml:id="tiger_roads.999">
            <tiger:CFCC>A41</tiger:CFCC>
            <tiger:NAME>W 188th St</tiger:NAME>
        </tiger:tiger_roads>
    </gml:featureMembers>
</wfs:FeatureCollection>

*request with startIndex=8008 or more produces no results: *

curl -X POST \
  'http://localhost:8080/geoserver/wfs?service=WFS' \
  -H 'accept: application/json' \
  -H 'accept-encoding: gzip, deflate, br' \
  -H 'accept-language: it' \
  -H 'cache-control: no-cache' \
  -H 'connection: keep-alive' \
  -H 'content-type: application/json' \
  -H 'origin: http://localhost:8081' \
  -H 'pragma: no-cache' \
  -H 'referer: http://localhost:8081/?debug=true' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36' \
  -d '<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="8008" maxFeatures="80"><wfs:Query typeName="tiger:tiger_roads" srsName="EPSG:4326"><wfs:PropertyName>NAME</wfs:PropertyName><wfs:PropertyName>CFCC</wfs:PropertyName><ogc:Filter><ogc:And></ogc:And></ogc:Filter></wfs:Query></wfs:GetFeature>'

response:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:tiger="http://www.census.gov" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" numberOfFeatures="80" timeStamp="2018-02-21T11:41:34.372Z" xsi:schemaLocation="http://www.census.gov http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=tiger%3Atiger_roads http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd"/>

HITS request tells anyway the features are 8333:

curl -X POST \
  'http://localhost:8080/geoserver/wfs?service=WFS' \
  -H 'accept: application/json' \
  -H 'accept-encoding: gzip, deflate, br' \
  -H 'accept-language: it' \
  -H 'cache-control: no-cache' \
  -H 'connection: keep-alive' \
  -H 'content-type: application/json' \
  -H 'origin: http://localhost:8081' \
  -H 'postman-token: fa220c43-311c-b52a-6920-fc036d512bc0' \
  -H 'pragma: no-cache' \
  -H 'referer: http://localhost:8081/?debug=true' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36' \
  -d '<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" resultType="hits" 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"><wfs:Query typeName="tiger:tiger_roads" srsName="EPSG:4326"></wfs:Query></wfs:GetFeature>'

response:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" numberOfFeatures="8333" timeStamp="2018-02-21T11:49:14.143Z" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"/>

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100080-sha1:8dde0bb)

Atlassian logo