[mapserver-users] Spatial Filter with WFS

Fischer, Andreas Andreas.Fischer at kreis-unna.de
Thu Nov 25 11:08:37 EST 2010


Dear MapServer User,
I want to let you know about the problem I had using filter encoding with a spatial filter requesting features via WFS:

1.	Yewondwossen Assefa could confirm that this is an issue with OGR type layers. He was able to reproduce the problem and added a bug on it [1]. Converting the ogr layer to shape and using the shape file directly in mapserver is working properly. As I experienced the problem with the OGR layer (MapInfo Tab) does only occur with MapServer version 5.6.5. I tested 5.4.2 and 5.2.3 and I did not run in the same problem with the same layer type. So it seems to be a matter of the MapServer version as well.

	[1]: http://trac.osgeo.org/mapserver/ticket/3617

2.	A work around for postgis layers is to avoid using "USING UNIQUE [column name different than oid]". Yewondwossen described this bug as well.
	
	[2]:http://trac.osgeo.org/mapserver/ticket/3618

	Note that this work around will only work if the table in the DATA clause was created with OIDS. Otherwise an error will occur. The error message shows that some piece of a program is looking for the column oid.
	
			<ows:Exception exceptionCode="mapserv" locator="NoApplicableCode">
			<ows:ExceptionText>
			msWFSGetFeature(): WFS server error. FLTApplyFilterToLayer() failed msPostGISLayerWhichShapes(): Query error. Error (ERROR: column "oid" does not exist LINE 1: ...on(force_2d("the_geom")),'NDR'),'base64') as geom,"oid" from... ^ ) executing query: select encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64') as geom,"oid" from ku_test_nooid where the_geom && GeomFromText('POLYGON((389965 5693582,389965 5732815,420177 5732815,420177 5693582,389965 5693582))',find_srid('','ku_test_nooid','the_geom'))
			</ows:ExceptionText> 
			</ows:Exception>
		
		In case of a subquery where USING UNIQUE is required, it is possible to use "USING UNIQUE OID". Otherwise another error occurs. So right now OIDS are needed in any case and in my opinion it would be worth thinking about to change this requirement to be able to use any other column with unique values.

Thanks to all who joined the discussion and helped solving this problem!
Best regards
Andreas


Mit freundlichen Grüßen
Im Auftrag

Andreas Fischer

Kreis Unna - Der Landrat
Zentrale Datenverarbeitung
Friedrich-Ebert-Straße 17
59425 Unna

Fon 02 3 03 27-44 16
Fax 0 23 03 27-28 96
andreas.fischer at kreis-unna.de
www.kreis-unna.de


Diese E-Mail wurde beim Ausgang auf Viren geprueft. Wegen der 
potentiellen Gefahr auf den Uebertragungswegen wird zu einer 
Vireneingangskontrolle geraten. Eine Haftung für Virenfreiheit
wird ausgeschlossen.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101125/ec846b6d/attachment-0001.html


More information about the mapserver-users mailing list