Publishing and projecting data in WFS
Obe, Regina
robe.dnd at CITYOFBOSTON.GOV
Thu May 24 07:26:45 PDT 2007
I'm using version 4.10.
I have a postgis layer that I need to publish as a WFS in both (at
least 4326 and 26986 projections). After some reading, it appears that
there is no way to project WFS data as you can with WMS and that you can
only have one projection in the wfs_srs meta data element.
I thought if I got rid of the wfs_srs at the top of my map and moved it
into the layer and had a separate duplicate layer with a different wfs,
that would do the trick. It doesn't seem to work. My data seems to be
falling back on using the projection that my map projection is
initialized to or if I specify a wfs_srs at top of map then it uses that
one for all layers.
With the below - I can query both layers in WFS in 4326 but not 26986.
WMS works fine in both projections
Here are what I think are the relevant sections of my map.
EXTENT -71.1914825439453 42.2277870178223 -70.9867935180664
42.396858215332 #EPSG:4326
PROJECTION
"init=epsg:4326"
END
LAYER
NAME "abandoned_private_2006"
CONNECTIONTYPE postgis
CONNECTION "user=cobuser dbname=dnddts host=10.241.27.5"
DATA "the_point FROM (SELECT a.gid, a.parcel_id, a.image, a.yrsurvey,
a.strno, a.street_name, a.suffix, a.zipcode, a.neighborhood,
a.property_type, pm.the_point FROM abandoned a INNER JOIN parcelmax pm
ON a.parcel_id = pm.pid WHERE yrsurvey = 2006) as foo USING UNIQUE gid
USING SRID=2249"
STATUS OFF
TYPE POINT
CLASS
NAME "Abandoned Private Property Survey 2006"
SYMBOL 'circle'
COLOR 200 0 100
SIZE 10
END
PROJECTION
"init=epsg:2249"
END
METADATA
"wms_title" "Abandoned Private 2006"
"wfs_title" "Abandoned Private 2006"
gml_include_items "all"
END
DUMP TRUE
TOLERANCE 10
END
LAYER
NAME "abandoned_private_2006_wfs_26986"
CONNECTIONTYPE postgis
CONNECTION "user=cobuser dbname=dnddts host=10.241.27.5"
DATA "the_point FROM (SELECT a.gid, a.parcel_id, a.image, a.yrsurvey,
a.strno, a.street_name, a.suffix, a.zipcode, a.neighborhood,
a.property_type, pm.the_point FROM abandoned a INNER JOIN parcelmax pm
ON a.parcel_id = pm.pid WHERE yrsurvey = 2006) as foo USING UNIQUE gid
USING SRID=2249"
STATUS OFF
TYPE POINT
CLASS
NAME "Abandoned Private Property Survey 2006"
SYMBOL 'circle'
COLOR 200 0 100
SIZE 10
END
PROJECTION
"init=epsg:2249"
END
METADATA
"wfs_title" "Abandoned Private 2006"
"wfs_srs" "EPSG:26986"
gml_include_items "all"
END
DUMP TRUE
TOLERANCE 10
END
Here are some live queries I have tried
(This one doesn't work)
http://dndmaps.cityofboston.gov/mapserv/scripts/mapserv410/mapserv410.ex
e?map=\mapserv\dndwms\dndbasepg.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=De
scribeFeatureType&MAXFEATURES=10&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFe
ature&TYPENAME=abandoned_private_2006_wfs_26986&SRS=EPSG:26986&BBOX=2347
88.268515625,895544.595390625,235124.914453125,895881.241328125
(Both of these do)
http://dndmaps.cityofboston.gov/mapserv/scripts/mapserv410/mapserv410.ex
e?map=\mapserv\dndwms\dndbasepg.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=De
scribeFeatureType&MAXFEATURES=10&SERVICE=WFS&VERSION=1.0.0&&MAXFEATURES=
10&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=abandoned_priva
te_2006&SRS=EPSG:4326&BBOX=-71.07845306396486,42.31057708887045,-71.0743
3319091798,42.31362368943784
http://dndmaps.cityofboston.gov/mapserv/scripts/mapserv410/mapserv410.ex
e?map=\mapserv\dndwms\dndbasepg.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=De
scribeFeatureType&MAXFEATURES=10&SERVICE=WFS&VERSION=1.0.0&&MAXFEATURES=
10&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=abandoned_priva
te_2006_wfs_26986&SRS=EPSG:4326&BBOX=-71.07845306396486,42.3105770888704
5,-71.07433319091798,42.31362368943784
Thanks,
Regina
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070524/abe728c2/attachment.htm>
More information about the MapServer-users
mailing list