[mapserver-users] [TinyOWS] Broken config using a MAPFILE?

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Wed Sep 19 02:09:21 PDT 2012


Hi,

At least you will have some troubles with your extents which do not match with your output projection
    EXTENT -180 -90 180 90
    UNITS DD
This may or may not be the reason for the failure but correct it anyway to use meters and the extents of your data.
I can also see that your Box is not a box but it is a line because the easting coordinates are the same
417651.92249206,6609322.2049643
417651.92249206,6811115.9596091

-Jukka Rahkonen-

Richard Turner wrote:

Hi folks,

I hope one of you can help me. A few months ago I was working on a project using tinyows to display UK postcode areas on an OpenLayers map. That was working fine, but it was a prototype and hasn't been touched for quite a while.

I've since set-up a new server and installed the trunk version of tinyows on it and found that instead of working fine tinyows returns the following error:

<?xml version='1.0' encoding='UTF-8'?>
<ows:ExceptionReport
xmlns='http://www.opengis.net/ows'
xmlns:ows='http://www.opengis.net/ows'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'
version='1.1.0' language='en'>
<ows:Exception exceptionCode='InvalidParameterValue' locator='FILTER'>
  <ows:ExceptionText>Filter parameter doesn't validate WFS Schema</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

The request being sent by OpenLayers is this:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd<http://www.opengis.net/wfs%20http:/schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd>" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Query typeName="feature:areas" xmlns:feature="http://gis.mediatel.co.uk"><ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:BBOX><ogc:PropertyName>wkb_geometry</ogc:PropertyName><gml:Box xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:3857"><gml:coordinates decimal="." cs="," ts=" ">-417651.92249206,6609322.2049643 417651.92249206,6811115.9596091</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter></wfs:Query></wfs:GetFeature>

I'm using a MAPFILE to configure tinyows because I was originally using mapserver instead (but I envisage the need for writing to the DB as well as reading). The mapfile is this:

MAP
    NAME "postcodes"
    STATUS ON
    EXTENT -180 -90 180 90
    UNITS DD

    WEB
        METADATA
            "tinyows_schema_dir" "/usr/local/share/tinyows/schema/"
            "tinyows_onlineresource" "richardt.gis.mediatel.co.uk/wfs"
            "wfs_title" "Postcode Data"
            "wfs_enable_request" "*"
            "wfs_namespace_uri" "http://gis.mediatel.co.uk"
            "wfs_namespace_prefix" "mtl"
        END
    END

    PROJECTION
        "init=epsg:3857"
    END

    LAYER
        NAME "areas"
        METADATA
            "wfs_name" "areas"
            "wfs_title" "Postcode Areas"
            "gml_featureid" "ogc_fid"
            "gml_include_items" "all"
            "wfs_enable_request" "*"
            "tinyows_table" "postcode_area_boundaries"
            "tinyows_retrievable" "1"
            "tinyows_writable" "1"
            "wfs_srs" "EPSG:3857"
        END
        TYPE POLYGON
        STATUS DEFAULT
        CONNECTIONTYPE postgis
        CONNECTION "host=localhost dbname=osm user=osm password=osm"
        DATA "wkb_geometry FROM postcode_area_boundaries"
        DUMP TRUE
    END

    LAYER
        NAME "sectors"
        METADATA
            "wfs_name" "sectors"
            "wfs_title" "Postcode Sectors"
            "gml_featureid" "ogc_fid"
            "gml_include_items" "all"
            "wfs_enable_request" "*"
            "tinyows_table" "postcode_sector_boundaries"
            "tinyows_retrievable" "1"
            "tinyows_writable" "1"
            "wfs_srs" "EPSG:3857"
        END
        TYPE POLYGON
        STATUS DEFAULT
        CONNECTIONTYPE postgis
        CONNECTION "host=localhost dbname=osm user=osm password=osm"
        DATA "wkb_geometry FROM postcode_sector_boundaries"
        DUMP TRUE
    END
END

Can anyone point me in the right direction here please?

Cheers,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120919/ae8204b7/attachment.htm>


More information about the MapServer-users mailing list