[mapserver-users] [TinyOWS] Broken config using a MAPFILE?
Richard Turner
richard.turner at mediatelgroup.co.uk
Wed Sep 26 05:53:05 PDT 2012
Hi Oliver,
Thanks for your help with this. I've been busy with other stuff, hence
the delay.
I've tweaked my map file a little and enabled TinyOWS logging. Still no
good.
I couldn't see what you changed in the request that would make it work
when you tried; it doesn't look significantly different from the one
OpenLayers is generating for me, except that the namespace is different.
This shouldn't matter though, should it?
Cheers,
R
Map file:
MAP
NAME "postcodes"
STATUS ON
EXTENT -20037508.34, -20037508.34, 20037508.34, 20037508.34
UNITS M
WEB
METADATA
"tinyows_schema_dir" "/usr/local/share/tinyows/schema/"
"tinyows_onlineresource"
"http://richardt.gis.mediatel.co.uk/wfs"
"tinyows_log" "/var/log/tinyows.log"
"tinyows_log_level" "15"
"wfs_title" "Postcode Data"
"wfs_enable_request" "*"
"wfs_namespace_uri" "http://richardt.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
TinyOWS log:
[Wed Sep 26 13:23:27 2012] [EVENT] == TINYOWS STARTUP ==
[Wed Sep 26 13:23:27 2012] [SQL] SELECT substr(postgis_full_version(),
10, 5)
[Wed Sep 26 13:23:28 2012] [EVENT] == Connection PostGIS ==
[Wed Sep 26 13:23:28 2012] [SQL] SELECT DISTINCT f_table_schema,
f_table_name FROM geometry_columns
[Wed Sep 26 13:23:28 2012] [SQL] SELECT DISTINCT f_table_schema,
f_table_name FROM geography_columns
[Wed Sep 26 13:23:28 2012] [SQL] SELECT srid, f_geometry_column FROM
geometry_columns WHERE f_table_schema='public' AND
f_table_name='postcode_area_boundaries'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT * FROM spatial_ref_sys WHERE
srid=3857 AND proj4text like '%%units=m%%'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attname AS field, t.typname AS
type FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE
n.nspname = 'public' AND c.relname = 'postcode_area_boundaries' AND
c.relnamespace = n.oid AND a.attrelid = c.oid AND a.atttypid = t.oid AND
a.attname IN ('all', '');
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attname AS field FROM pg_class
c, pg_attribute a, pg_type t, pg_namespace n WHERE n.nspname = 'public'
AND c.relname = 'postcode_area_boundaries' AND c.relnamespace = n.oid
AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND
a.attnotnull = 't' AND a.atthasdef='f'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT c.column_name FROM
information_schema.constraint_column_usage c, pg_namespace n WHERE
n.nspname = 'public' AND c.table_name = 'postcode_area_boundaries' AND
c.constraint_name = (SELECT c.conname FROM pg_class r, pg_constraint c,
pg_namespace n WHERE r.oid = c.conrelid AND relname =
'postcode_area_boundaries' AND r.relnamespace = n.oid AND n.nspname =
'public' AND c.contype = 'p')
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attnum FROM pg_class c,
pg_attribute a, pg_type t, pg_namespace n WHERE a.attrelid = c.oid AND
a.atttypid = t.oid AND n.nspname='public' AND
c.relname='postcode_area_boundaries' AND a.attname='ogc_fid'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT
pg_get_serial_sequence('public."postcode_area_boundaries"', 'ogc_fid');
[Wed Sep 26 13:23:28 2012] [SQL] SELECT column_default FROM
information_schema.columns WHERE table_schema = 'public' AND table_name
= 'postcode_area_boundaries' AND column_name = 'ogc_fid' AND
table_catalog = current_database();
[Wed Sep 26 13:23:28 2012] [SQL] SELECT srid, f_geometry_column FROM
geometry_columns WHERE f_table_schema='public' AND
f_table_name='postcode_sector_boundaries'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT * FROM spatial_ref_sys WHERE
srid=900914 AND proj4text like '%%units=m%%'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attname AS field, t.typname AS
type FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE
n.nspname = 'public' AND c.relname = 'postcode_sector_boundaries' AND
c.relnamespace = n.oid AND a.attrelid = c.oid AND a.atttypid = t.oid AND
a.attname IN ('all', '');
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attname AS field FROM pg_class
c, pg_attribute a, pg_type t, pg_namespace n WHERE n.nspname = 'public'
AND c.relname = 'postcode_sector_boundaries' AND c.relnamespace = n.oid
AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND
a.attnotnull = 't' AND a.atthasdef='f'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT c.column_name FROM
information_schema.constraint_column_usage c, pg_namespace n WHERE
n.nspname = 'public' AND c.table_name = 'postcode_sector_boundaries' AND
c.constraint_name = (SELECT c.conname FROM pg_class r, pg_constraint c,
pg_namespace n WHERE r.oid = c.conrelid AND relname =
'postcode_sector_boundaries' AND r.relnamespace = n.oid AND n.nspname =
'public' AND c.contype = 'p')
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attnum FROM pg_class c,
pg_attribute a, pg_type t, pg_namespace n WHERE a.attrelid = c.oid AND
a.atttypid = t.oid AND n.nspname='public' AND
c.relname='postcode_sector_boundaries' AND a.attname='ogc_fid'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT
pg_get_serial_sequence('public."postcode_sector_boundaries"',
'ogc_fid');
[Wed Sep 26 13:23:28 2012] [SQL] SELECT column_default FROM
information_schema.columns WHERE table_schema = 'public' AND table_name
= 'postcode_sector_boundaries' AND column_name = 'ogc_fid' AND
table_catalog = current_database();
[Wed Sep 26 13:23:28 2012] [EVENT] == Filling Storage ==
[Wed Sep 26 13:23:28 2012] [QUERY] <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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Query
typeName="feature:areas"
xmlns:feature="http://richardt.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,6625221.1068455 417651.92249206,6795217.0577279</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter></wfs:Query></wfs:GetFeature>
[Wed Sep 26 13:23:28 2012] [EVENT] == TINYOWS STARTUP ==
[Wed Sep 26 13:23:28 2012] [SQL] SELECT substr(postgis_full_version(),
10, 5)
[Wed Sep 26 13:23:28 2012] [EVENT] == Connection PostGIS ==
[Wed Sep 26 13:23:28 2012] [SQL] SELECT DISTINCT f_table_schema,
f_table_name FROM geometry_columns
[Wed Sep 26 13:23:28 2012] [SQL] SELECT DISTINCT f_table_schema,
f_table_name FROM geography_columns
[Wed Sep 26 13:23:28 2012] [SQL] SELECT srid, f_geometry_column FROM
geometry_columns WHERE f_table_schema='public' AND
f_table_name='postcode_area_boundaries'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT * FROM spatial_ref_sys WHERE
srid=3857 AND proj4text like '%%units=m%%'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attname AS field, t.typname AS
type FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE
n.nspname = 'public' AND c.relname = 'postcode_area_boundaries' AND
c.relnamespace = n.oid AND a.attrelid = c.oid AND a.atttypid = t.oid AND
a.attname IN ('all', '');
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attname AS field FROM pg_class
c, pg_attribute a, pg_type t, pg_namespace n WHERE n.nspname = 'public'
AND c.relname = 'postcode_area_boundaries' AND c.relnamespace = n.oid
AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND
a.attnotnull = 't' AND a.atthasdef='f'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT c.column_name FROM
information_schema.constraint_column_usage c, pg_namespace n WHERE
n.nspname = 'public' AND c.table_name = 'postcode_area_boundaries' AND
c.constraint_name = (SELECT c.conname FROM pg_class r, pg_constraint c,
pg_namespace n WHERE r.oid = c.conrelid AND relname =
'postcode_area_boundaries' AND r.relnamespace = n.oid AND n.nspname =
'public' AND c.contype = 'p')
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attnum FROM pg_class c,
pg_attribute a, pg_type t, pg_namespace n WHERE a.attrelid = c.oid AND
a.atttypid = t.oid AND n.nspname='public' AND
c.relname='postcode_area_boundaries' AND a.attname='ogc_fid'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT
pg_get_serial_sequence('public."postcode_area_boundaries"', 'ogc_fid');
[Wed Sep 26 13:23:28 2012] [SQL] SELECT column_default FROM
information_schema.columns WHERE table_schema = 'public' AND table_name
= 'postcode_area_boundaries' AND column_name = 'ogc_fid' AND
table_catalog = current_database();
[Wed Sep 26 13:23:28 2012] [SQL] SELECT srid, f_geometry_column FROM
geometry_columns WHERE f_table_schema='public' AND
f_table_name='postcode_sector_boundaries'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT * FROM spatial_ref_sys WHERE
srid=900914 AND proj4text like '%%units=m%%'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attname AS field, t.typname AS
type FROM pg_class c, pg_attribute a, pg_type t, pg_namespace n WHERE
n.nspname = 'public' AND c.relname = 'postcode_sector_boundaries' AND
c.relnamespace = n.oid AND a.attrelid = c.oid AND a.atttypid = t.oid AND
a.attname IN ('all', '');
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attname AS field FROM pg_class
c, pg_attribute a, pg_type t, pg_namespace n WHERE n.nspname = 'public'
AND c.relname = 'postcode_sector_boundaries' AND c.relnamespace = n.oid
AND a.attnum > 0 AND a.attrelid = c.oid AND a.atttypid = t.oid AND
a.attnotnull = 't' AND a.atthasdef='f'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT c.column_name FROM
information_schema.constraint_column_usage c, pg_namespace n WHERE
n.nspname = 'public' AND c.table_name = 'postcode_sector_boundaries' AND
c.constraint_name = (SELECT c.conname FROM pg_class r, pg_constraint c,
pg_namespace n WHERE r.oid = c.conrelid AND relname =
'postcode_sector_boundaries' AND r.relnamespace = n.oid AND n.nspname =
'public' AND c.contype = 'p')
[Wed Sep 26 13:23:28 2012] [SQL] SELECT a.attnum FROM pg_class c,
pg_attribute a, pg_type t, pg_namespace n WHERE a.attrelid = c.oid AND
a.atttypid = t.oid AND n.nspname='public' AND
c.relname='postcode_sector_boundaries' AND a.attname='ogc_fid'
[Wed Sep 26 13:23:28 2012] [SQL] SELECT
pg_get_serial_sequence('public."postcode_sector_boundaries"',
'ogc_fid');
[Wed Sep 26 13:23:28 2012] [SQL] SELECT column_default FROM
information_schema.columns WHERE table_schema = 'public' AND table_name
= 'postcode_sector_boundaries' AND column_name = 'ogc_fid' AND
table_catalog = current_database();
[Wed Sep 26 13:23:28 2012] [EVENT] == Filling Storage ==
[Wed Sep 26 13:23:28 2012] [QUERY]
service=WFS&request=DescribeFeatureType&version=1.0.0
[Wed Sep 26 13:23:28 2012] [EVENT] == TINYOWS SHUTDOWN ==
[Wed Sep 26 13:23:28 2012] [ERROR] Element
'{http://www.w3.org/2001/XMLSchema}import': Skipping import of schema
located at 'http://schemas.opengis.net/gml/2.1.2/feature.xsd' for the
namespace 'http://www.opengis.net/gml', since this namespace was already
imported with the schema located at
'/usr/local/share/tinyows/schema/gml/2.1.2/feature.xsd'.
[Wed Sep 26 13:23:28 2012] [SQL] SELECT auth_name, auth_srid,
position('+units=m ' in proj4text), (position('AXIS["X",NORTH]]' in
srtext) + position('AXIS["Easting",EAST]]' in srtext)) FROM
spatial_ref_sys WHERE srid = '3857'
[Wed Sep 26 13:23:28 2012] [ERROR] Filter parameter doesn't validate WFS
Schema
[Wed Sep 26 13:23:28 2012] [EVENT] == TINYOWS SHUTDOWN ==
On Wed, 2012-09-19 at 10:27 +0200, Olivier Courtin wrote:
>
>
> On Wed, Sep 19, 2012 at 9:43 AM, Richard Turner
> <richard.turner at mediatelgroup.co.uk> wrote:
>
>
> Hi Richard
>
>
> 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:
>
> <ows:ExceptionText>Filter parameter doesn't validate WFS
> Schema</ows:ExceptionText>
>
>
>
>
>
>
> I've slightly changed the request you provided, to make it works with
> a TinyOWS trunk (i use TinyOWS XML config file here):
>
>
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS"
> version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">
> <wfs:Query xmlns:tows="http://www.tinyows.org/"
> typeName="tows:france">
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
> <ogc:BBOX>
> <ogc:PropertyName>geom</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>
>
>
>
>
>
>
> To go further in debug, could you activate log
> (or recompile tinyows with --enable-debug option)
> and send the whole log here.
>
>
> Thanks.
>
>
>
> --
> Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120926/b6ed3932/attachment.htm>
More information about the MapServer-users
mailing list