<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.Shkpostityyli17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">At least you will have some troubles with your extents which do not match with your output projection<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">    EXTENT -180 -90 180 90<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">    UNITS DD<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This may or may not be the reason for the failure but correct it anyway to use meters and the extents of your data.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I can also see that your Box is not a box but it is a line because the easting coordinates are the same<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">417651.92249206,6609322.2049643<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">417651.92249206,6811115.9596091<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Richard Turner wrote:<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hi folks,<br>
<br>
I hope one of you can help me. A few months ago I was working on a project using tinyows to display UK postcode ar</span>eas on an OpenLayers map. That was working fine, but it was a prototype and hasn't been touched for quite a while.<br>
<br>
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:<br>
<br>
<?xml version='1.0' encoding='UTF-8'?><br>
<ows:ExceptionReport<br>
xmlns='<a href="http://www.opengis.net/ows'">http://www.opengis.net/ows'</a><br>
xmlns:ows='<a href="http://www.opengis.net/ows'">http://www.opengis.net/ows'</a><br>
xmlns:xsi='<a href="http://www.w3.org/2001/XMLSchema-instance'">http://www.w3.org/2001/XMLSchema-instance'</a><br>
xsi:schemaLocation='<a href="http://www.opengis.net/ows">http://www.opengis.net/ows</a>
<a href="http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'">http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd'</a><br>
version='1.1.0' language='en'><br>
<ows:Exception exceptionCode='InvalidParameterValue' locator='FILTER'><br>
  <ows:ExceptionText>Filter parameter doesn't validate WFS Schema</ows:ExceptionText><br>
</ows:Exception><br>
</ows:ExceptionReport><br>
<br>
The request being sent by OpenLayers is this:<br>
<wfs:GetFeature xmlns:wfs="<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>" service="WFS" version="1.0.0" xsi:schemaLocation="<a href="http://www.opengis.net/wfs%20http:/schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">http://www.opengis.net/wfs
 http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"><wfs:Query typeName="feature:areas" xmlns:feature="<a href="http://gis.mediatel.co.uk">http://gis.mediatel.co.uk</a>"><ogc:Filter
 xmlns:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>"><ogc:BBOX><ogc:PropertyName>wkb_geometry</ogc:PropertyName><gml:Box xmlns:gml="<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>" 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><br>
<br>
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:<br>
<br>
MAP<br>
    NAME "postcodes"<br>
    STATUS ON<br>
    EXTENT -180 -90 180 90<br>
    UNITS DD<br>
<br>
    WEB<br>
        METADATA<br>
            "tinyows_schema_dir" "/usr/local/share/tinyows/schema/"<br>
            "tinyows_onlineresource" "richardt.gis.mediatel.co.uk/wfs"<br>
            "wfs_title" "Postcode Data"<br>
            "wfs_enable_request" "*"<br>
            "wfs_namespace_uri" "<a href="http://gis.mediatel.co.uk">http://gis.mediatel.co.uk</a>"<br>
            "wfs_namespace_prefix" "mtl"<br>
        END<br>
    END<br>
<br>
    PROJECTION<br>
        "init=epsg:3857"<br>
    END<br>
<br>
    LAYER<br>
        NAME "areas"<br>
        METADATA<br>
            "wfs_name" "areas"<br>
            "wfs_title" "Postcode Areas"<br>
            "gml_featureid" "ogc_fid"<br>
            "gml_include_items" "all"<br>
            "wfs_enable_request" "*"<br>
            "tinyows_table" "postcode_area_boundaries"<br>
            "tinyows_retrievable" "1"<br>
            "tinyows_writable" "1"<br>
            "wfs_srs" "EPSG:3857"<br>
        END<br>
        TYPE POLYGON<br>
        STATUS DEFAULT<br>
        CONNECTIONTYPE postgis<br>
        CONNECTION "host=localhost dbname=osm user=osm password=osm"<br>
        DATA "wkb_geometry FROM postcode_area_boundaries"<br>
        DUMP TRUE<br>
    END<br>
<br>
    LAYER<br>
        NAME "sectors"<br>
        METADATA<br>
            "wfs_name" "sectors"<br>
            "wfs_title" "Postcode Sectors"<br>
            "gml_featureid" "ogc_fid"<br>
            "gml_include_items" "all"<br>
            "wfs_enable_request" "*"<br>
            "tinyows_table" "postcode_sector_boundaries"<br>
            "tinyows_retrievable" "1"<br>
            "tinyows_writable" "1"<br>
            "wfs_srs" "EPSG:3857"<br>
        END<br>
        TYPE POLYGON<br>
        STATUS DEFAULT<br>
        CONNECTIONTYPE postgis<br>
        CONNECTION "host=localhost dbname=osm user=osm password=osm"<br>
        DATA "wkb_geometry FROM postcode_sector_boundaries"<br>
        DUMP TRUE<br>
    END<br>
END<br>
<br>
Can anyone point me in the right direction here please?<br>
<br>
Cheers,<br>
Richard <o:p></o:p></p>
</div>
</div>
</body>
</html>