Skip to content

Wrong number of result when we use a limit #6230

@sbrunner

Description

@sbrunner

Expected behavior and actual behavior.

When I do a WFS GetFeature request on 2 layers with a limit some times the number of results is lower than expected.

It's like that MapServer query the first layer, and if he is OK with the number of getting features, event if it didn't raise the limit, he didn't query the second layer...

Steps to reproduce the problem.

The following request

curl 'https://localhost:8484/' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: fr-CH,fr;q=0.8,en;q=0.5,en-US;q=0.3' --compressed -H 'Referer: https://localhost:8484/' -H 'Content-Type: text/xml; charset=UTF-8' -H 'Origin: https://localhost:8484' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Cookie: cookieconsent_status=deny; ga-disable-UA-2577926-1=true; _osm_location=6.8753%7C46.1924%7C16%7CM; _LOCALE_=fr; JSESSIONID=65435F16F81E6AE673702C33B9E31C6D; GS_FLOW_CONTROL=GS_CFLOW_753d283f:171d1813121:-7ffe; _osm_session=efe18880ebe449c0fc9392646df71daa' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data-raw '<GetFeature xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" outputFormat="GML3" maxFeatures="5" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Query typeName="feature:fuel" srsName="EPSG:2056" xmlns:feature="http://mapserver.gis.umn.edu/mapserver"><Filter xmlns="http://www.opengis.net/ogc"><BBOX><PropertyName>geom</PropertyName><Envelope xmlns="http://www.opengis.net/gml" srsName="EPSG:2056"><lowerCorner>2607162.692786508 1184272.6393956193</lowerCorner><upperCorner>2612615.91629499 1190100.5118474325</upperCorner></Envelope></BBOX></Filter></Query><Query typeName="feature:post_office" srsName="EPSG:2056" xmlns:feature="http://mapserver.gis.umn.edu/mapserver"><Filter xmlns="http://www.opengis.net/ogc"><BBOX><PropertyName>geom</PropertyName><Envelope xmlns="http://www.opengis.net/gml" srsName="EPSG:2056"><lowerCorner>2607162.692786508 1184272.6393956193</lowerCorner><upperCorner>2612615.91629499 1190100.5118474325</upperCorner></Envelope></BBOX></Filter></Query></GetFeature>'

Returns me 3 results on MapServer 7.6 but 5 on MapServer 7.4.

Layers definition:

LAYER
    NAME "post_office"
    EXTENT 2473743 1074095 2839000 1306400
    TYPE POINT
    STATUS ON
    TEMPLATE fooOnlyForWMSGetFeatureInfo # For GetFeatureInfo
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER" # For performance
    CONNECTION "host=${PGHOST_SLAVE} port=${PGPORT_SLAVE} user=${PGUSER} password=${PGPASSWORD} dbname=${OSM_PGDATABASE}"
    DATA "geom FROM (
        SELECT
            regexp_replace(format(\'%s\', name), \'^$\', osm_id::text) AS display_name,
            name,osm_id,access,aerialway,amenity,barrier,bicycle,brand,building,covered,denomination,ele,foot,highway,
            layer,leisure,man_made,motorcar,\"natural\", operator, population, power, place, railway, ref, religion,
            shop, sport, surface, tourism, waterway, wood, way AS geom
        FROM planet_osm_point
        WHERE amenity = 'post_office'
    ) AS foo USING unique osm_id USING srid=2056"
    LABELITEM "name"
    PROJECTION
        "init=epsg:2056"
    END
    TOLERANCE 10
    TOLERANCEUNITS pixels

    CLASS
        NAME "Office de poste"
        KEYIMAGE symbols/postal.png
        STYLE
            SYMBOL "postal"
            SIZE 30
        END
        LABEL
            SIZE 12
            OFFSET 0 10
            COLOR 128 128 0
            OUTLINECOLOR 255 255 255
            OUTLINEWIDTH 2
            PARTIALS FALSE
            MAXSCALEDENOM 150000
        END
    END
    METADATA
        "wms_title" "post_office"
        "gml_include_items" "all"
        "gml_types" "auto"
        "gml_featureid" "osm_id"
        "gml_geom_type" "point"
        "gml_geometries" "geom"
    END
END

LAYER
    NAME "fuel"
    EXTENT 2473743 1074095 2839000 1306400
    TYPE POINT
    STATUS ON
    TEMPLATE fooOnlyForWMSGetFeatureInfo # For GetFeatureInfo
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER" # For performance
    CONNECTION "host=${PGHOST_SLAVE} port=${PGPORT_SLAVE} user=${PGUSER} password=${PGPASSWORD} dbname=${OSM_PGDATABASE}"
    DATA "geom FROM (
        SELECT
            regexp_replace(format(\'%s\', name), \'^$\', osm_id::text) AS display_name,
            name,osm_id,access,aerialway,amenity,barrier,bicycle,brand,building,covered,denomination,ele,
            foot,highway,layer,leisure,man_made,motorcar,\"natural\", operator, population, power, place,
            railway, ref, religion, shop, sport, surface, tourism, waterway, wood, way AS geom
        FROM planet_osm_point
        WHERE amenity = 'fuel'
    ) AS foo USING unique osm_id USING srid=2056"
    LABELITEM "name"
    PROJECTION
        "init=epsg:2056"
    END
    TOLERANCE 10
    TOLERANCEUNITS pixels

    CLASS
        NAME "Station service"
        KEYIMAGE symbols/fillingstation.png
        STYLE
            SYMBOL "fillingstation"
            SIZE 30
        END
        LABEL
            SIZE 12
            OFFSET 0 10
            COLOR 157 112 80
            OUTLINECOLOR 255 255 255
            OUTLINEWIDTH 2
            PARTIALS FALSE
            MAXSCALEDENOM 150000
        END
    END
    METADATA
        "wms_title" "fuel"
        "gml_include_items" "all"
        "gml_types" "auto"
        "gml_featureid" "osm_id"
        "gml_geom_type" "point"
        "gml_geometries" "geom"
    END
END

Operating system

Ubuntu 20.04 64 bit

MapServer version and installation method

7.6.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions