[mapserver-users] WFS srsName does not work with PostGIS layers
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Fri Dec 16 09:46:01 PST 2011
Hi,
Using srsName for reprojecting the resultset of WFS 1.1.0 GetFeature works OK when I use shapefiles as datasource. However, it I use PostGIS as datasource Mapserver does not find any features with a non-native srsName.
It is not a wonder because using srsName is changing the data window.
Without srsName, means that the native srsName EPSG:3067 is used
[Fri Dec 16 19:31:25 2011].351479 msPostGISLayerWhichShapes query: select "gid",,encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'hex') as geom,"gid" from municipalities where the_geom && GeomFromText('POLYGON((-25000000 -25000000,-25000000 25000000,25000000 25000000,25000000 -25000000,-25000000 -25000000))',3067) limit 2
With srsName=EPSG:4326. Notice, that the data window polygon is modified. However, it should not. The query from the PostGIS should remain the same because just the output should be converted into EPSG:4326.
[Fri Dec 16 19:32:46 2011].564500 msPostGISLayerWhichShapes query: select "gid",,encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'hex') as geom,"gid" from municipalities where the_geom && GeomFromText('POLYGON((-16344931.6696761 -300.401875399739,-16344931.6696761 -53.9733500203773,17985512.3469393 -53.9733500203773,17985512.3469393 -300.401875399739,-16344931.6696761 -300.401875399739))',3067) limit 2
Corresponding requests:
http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/wfsmap/mapserver_wfs.map&service=wfs&version=1.0.0&request=getfeature&typename=municipalities&maxfeatures=2
http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/wfsmap/mapserver_wfs.map&service=wfs&version=1.1.0&request=getfeature&typename=municipalities&maxfeatures=2&srsname=EPSG:4326
Server is Mapserver 6.0.1 on Linux.
-Jukka Rahkonen-
More information about the MapServer-users
mailing list