WFS Serving Multipolygon as Multipoint
Simpson
asimpson at I-55.COM
Mon Nov 7 11:03:10 PST 2005
I think I've been staring at this too long, not sure how POINT snuck in
there, sorry about that one.
Thanks,
Drew.
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Steve Lime
Sent: Monday, November 07, 2005 12:21 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] WFS Serving Multipolygon as
Multipoint
I think it is because the PostGIS driver forces features into MapServer
shapeObj's of a given type
based on layer type. Since your layer type is POINT the resulting shape from
PostGIS is of type
MS_SHAPE_POINT. The GML writer knows nothing about the original storage
format.
The bug you mention has been fixed in the CVS...
Steve
>>> Simpson <asimpson at I-55.COM> 11/07/05 10:54 AM >>>
Hello,
Why would a postgis multipolygon be served as a multipoint?
Also, with the DATA statement set to 'the_geom from eden_isles', maps would
render fine but the WFS server wouldn't return any features. Looks like it
is trying to pass a long as the feature_id, and the table primary key is a
string. The SQL calls from WFS have 'name = 0' in the 'where' clause, and
obviously no rows are returned. This used to work in earlier versions. Are
geo-tables with char PK's supported?
Thanks for any info,
Drew.
===========================================================================
============
MapServer version 4.6.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG
SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=THREADS INPUT=TIFF
INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
===========================================================================
=============
LAYER
NAME "eden_isles"
STATUS OFF
TYPE POINT
DUMP TRUE
CONNECTIONTYPE postgis
CONNECTION "user=xxx password=xxx dbname=xxx host=xxx port=5432"
DATA "the_geom from (select oid, name,description,the_geom,an_int,comments
from eden_isles) as foo using UNIQUE oid using SRID=32615"
TEMPLATE "/xxx/query_template.xml"
TOLERANCE 10
TOLERANCEUNITS meters
PROJECTION
"init=epsg:32615"
END
METADATA
"wfs_title" "eden_isles"
"wfs_srs" "EPSG:32615"
"wfs_abstract" "eden_isles"
"wfs_keywordlist" "eden_isles"
END
END
===========================================================================
=============
Table "public.eden_isles"
Column | Type | Modifiers
-------------+------------------------+-----------
name | character(24) | not null
description | character varying(256) |
the_geom | geometry |
an_int | integer |
comments | character varying |
Indexes:
"eden_isles_pkey" primary key, btree (name)
"idx_eden_isles_gist" gist (the_geom)
"idx_eden_isles_oid" btree (oid)
Check constraints:
"$1" CHECK (srid(the_geom) = 32615)
"$2" CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS
NULL)
===========================================================================
============
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
xmlns:myns="http://www.ttt.org/myns"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://ogc.dmsolutions.ca/wfs/1.0.0/WFS-basic.xsd
http://www.ttt.org/myns
https://xxx?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&am
p;TYPENAME=eden_isles&OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:32615">
<gml:coordinates>806291.512569,3346809.680220
809504.014362,3348828.847769</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<myns:eden_isles>
<gml:boundedBy>
<gml:Box srsName="EPSG:32615">
<gml:coordinates>809299.323171,3346809.680220
809504.014362,3347069.507156</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<myns:msGeometry>
<gml:MultiPoint srsName="EPSG:32615">
<gml:Point>
<gml:coordinates>809299.323171,3347069.507156</gml:coordinates>
</gml:Point>
<gml:Point>
<gml:coordinates>809504.014362,3347069.507156</gml:coordinates>
</gml:Point>
<gml:Point>
<gml:coordinates>809504.014362,3346809.680220</gml:coordinates>
</gml:Point>
<gml:Point>
<gml:coordinates>809299.323171,3346809.680220</gml:coordinates>
</gml:Point>
<gml:Point>
<gml:coordinates>809299.323171,3347069.507156</gml:coordinates>
</gml:Point>
</gml:MultiPoint>
<myns:msGeometry> <----- I reported in Bugzilla
</myns:eden_isles>
</gml:featureMember>
</wfs:FeatureCollection>
More information about the MapServer-users
mailing list