[mapserver-users] WFS - featureid/resourceid

TC Haddad tchaddad at gmail.com
Sat May 7 14:22:55 PDT 2016


Yes,

I don't know if adding

PROCESSING 'NATIVE_FILTER=id'

is useful but for the validation, something like:

VALIDATION

  # %id% must be numeric and between 1 and 8 characters
  'id'      '^[0-9]{1,8)$'END

might improve the situation?

Also ensure that you are passing a valid id number - '1' was just a guess...

On Sat, May 7, 2016 at 1:46 PM, aperi2007 <aperi2007 at gmail.com> wrote:

> Perhaps the mapserver need a validation block in mapserver to check the ID
> value from parameter ?
> A.
>
>
>
> Il 07/05/2016 21:39, TC Haddad ha scritto:
>
>
> Well it looks like your map file settings are fine, and a correctly
> formatted URL would be:
>
>
> http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&STOREDQUERY_ID=urn:ogc:def:query:OGC-WFS::GetFeatureById&ID=DATA_TEST.1
>
> However the resulting error message indicates that something may else may
> be amiss:
>
> msQueryByFilter(): Search returned no results. No matching record(s) found.
> LayerDefaultTranslateFilter(): General error message. This data driver
> does not implement filter translation support
>
> On Sat, May 7, 2016 at 12:29 PM, Ian Walberg <ian.walberg at airborne.aero>
> wrote:
>
>> And also in the WEB section
>>
>>
>>
>>
>>
>>   METADATA
>>
>>                 "wfs_title"          "WFS Test"
>>
>>                 "wfs_onlineresource" " <http://127.0.0.1/cgi-bin/mapserv>
>> http://127.0.0.1/cgi-bin/mapserv?"
>>
>>                 "wfs_srs"            "EPSG:4326"
>>
>>                 "wfs_abstract"       "WFS Test"
>>
>>                 "wfs_enable_request" "*"
>>
>>                 "wfs_getfeature_formatlist" "geojson"
>>
>>
>>
>> Ian
>>
>>
>>
>> *From:* mapserver-users [mailto:
>> <mapserver-users-bounces at lists.osgeo.org>
>> mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Ian Walberg
>> *Sent:* Saturday, May 7, 2016 12:27 PM
>> *To:* TC Haddad < <tchaddad at gmail.com>tchaddad at gmail.com>
>> *Cc:* mapserver-users at lists.osgeo.org
>>
>> *Subject:* Re: [mapserver-users] WFS - featureid/resourceid
>>
>>
>>
>> Here is what we have in the map file layer, what have we missed?
>>
>>
>>
>> METADATA
>>
>>                         "wfs_srs" "EPSG:4326"
>>
>>                         "wfs_title" "DATA_POI"
>>
>>                         "gml_featureid" "id"
>>
>>                         "gml_include_items" "all"
>>
>>                         "wfs_enable_request" "*"
>>
>>                         "wfs_encoding" "UTF-8"
>>
>>                         "wfs_abstract" "Points"
>>
>>                         "wfs_getfeature_formatlist" "geojson"
>>
>>                 END
>>
>> Thanks
>>
>>
>>
>> Ian
>>
>>
>>
>> *From:* TC Haddad [mailto:tchaddad at gmail.com <tchaddad at gmail.com>]
>> *Sent:* Saturday, May 7, 2016 12:12 PM
>> *To:* Ian Walberg < <ian.walberg at airborne.aero>ian.walberg at airborne.aero>
>> *Cc:* Rahkonen Jukka (MML) < <jukka.rahkonen at maanmittauslaitos.fi>
>> jukka.rahkonen at maanmittauslaitos.fi>; mapserver-users at lists.osgeo.org
>> *Subject:* Re: [mapserver-users] WFS - featureid/resourceid
>>
>>
>>
>>
>>
>> Ian
>>
>> you may have to enable the GetFeatureById option in your mapfile as at
>> the moment it looks like you have it turned off.
>>
>> Put something like this in the LAYER block to enable all WFS requests:
>>
>> "wfs_enable_request" "*"
>>
>> From there you can begin to test with:
>>
>>
>> http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeatureById
>>
>> And the server will tell you what other parameters you need to add to the
>> URL in order to successfully return a record.
>>
>>
>>
>> On Sat, May 7, 2016 at 11:44 AM, Ian Walberg <
>> <ian.walberg at airborne.aero>ian.walberg at airborne.aero> wrote:
>>
>> Jukka,
>>
>>
>>
>> We could not get that to work, what is the syntax for our setup?
>>
>>
>>
>> Thanks
>>
>>
>>
>> Ian
>>
>>
>>
>> *From:* Rahkonen Jukka (MML) [mailto:
>> <jukka.rahkonen at maanmittauslaitos.fi>jukka.rahkonen at maanmittauslaitos.fi]
>>
>> *Sent:* Saturday, May 7, 2016 10:54 AM
>> *To:* Ian Walberg < <ian.walberg at airborne.aero>ian.walberg at airborne.aero>;
>> mapserver-users at lists.osgeo.org
>> *Subject:* VS: [mapserver-users] WFS - featureid/resourceid
>>
>>
>>
>> I would try the GetFeatureById stored query
>> http://mapserver.org/ogc/wfs_server.html
>>
>> Jukka Rahkonen
>> ------------------------------
>>
>> *Lähettäjä: *Ian Walberg <ian.walberg at airborne.aero>
>> *Lähetetty: *‎7.‎5.‎2016 20:47
>> *Vastaanottaja: * <mapserver-users at lists.osgeo.org>
>> mapserver-users at lists.osgeo.org
>> *Aihe: *[mapserver-users] WFS - featureid/resourceid
>>
>> Folks,
>>
>> How do we select just a single feature using FEATUREID or RESOUCEID.
>>
>>
>> http://wfs-dev.airborne.aero/cgi-bin/mapserv?map=/data/wfs/WFS_TEST.map&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=DATA_TEST
>>
>> Thanks
>>
>> Ian
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>>
>
>
>
> _______________________________________________
> mapserver-users mailing listmapserver-users at lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160507/ec9af3b9/attachment-0001.html>


More information about the mapserver-users mailing list