[mapserver-users] TinyOWS: GetFeature request from a DB view

Richard Turner richard.turner at mediatel.co.uk
Wed May 13 02:24:57 PDT 2015


Hi,

I'm trying to configure TinyOWS using a mapfile, which I'll also use
to configure mapserver. My layers come from DB views, not tables, so
they have no primary keys. For mapserver I specify the "gml_featureid"
and all works well. If I configure TinyOWS using an XML file instead,
and specify the "pkey" attribute that all works too.

I can't seem to configure TinyOWS to work using the mapfile though; no
matter how I try to specify the pkey I always get the error:

<ServiceException code="NoMatching" locator="GetFeature">
error : an id_column is required to use featureid</ServiceException>
</ServiceExceptionReport>

There's a layer definition below. Is this a bug (or missing feature)
or am I just trying to configure the pkey wrong?

Cheers,
 Richard.


LAYER
    NAME "title_circulation_areas"
    METADATA
        "wfs_title"                 "Press Title circulation areas"
        "wfs_srs"                   "EPSG:3857"
        "wfs_enable_request"        "*"
        "wfs_getfeature_formatlist" "json"
        "wfs_geomtype"              "multipolygon"
        "wfs_typename"              "title_circulation_areas"
        "gml_featureid"             "id"
        "gml_include_items"         "id,name,wkb_geometry"
        "tinyows_table"             "title_circulation_areas"
        "tinyows_retrievable"       "1"
        "tinyows_include_items"     "id,name,wkb_geometry"

        "pkey"                      "id"
    END
    TYPE POLYGON
    STATUS ON
    CONNECTIONTYPE POSTGIS
    CONNECTION "host=host port=5432 dbname=db user=user password=pass"
    DATA "wkb_geometry FROM title_circulation_areas USING UNIQUE id"
    DUMP TRUE
END



More information about the mapserver-users mailing list