[mapserver-users] SLD with filter

Yewondwossen Assefa yassefa at dmsolutions.ca
Tue May 31 13:35:12 EDT 2011


Daniel,

  I just did a quick test with 5.6.x (svn) and a postgis layer using the 
metadata but could not reproduce a crash. If it is something I can 
reproduce using some test map/data/filter, I will investigate. You can 
either send them to me or attache it to a trac bug.

best regards

On 31/05/2011 10:25 AM, Daniel Degasperi wrote:
> Ok, with the metadata tag described below mapserver does not reprocude 
> this error, but it throws a segfault.
> I've put the coredump online: http://www.r3-gis.com/core.333.gz
>
> Best regards,
> Daniel
>
> Am 31/05/2011 14:37, schrieb Yewondwossen Assefa:
>> Hi Daniel,
>>
>>  You could possibly try to set on the layer a metadata for the type 
>> of your field to force it to string: something like
>>   metadata
>>      "ows_localita_type" "Character"
>>      ...
>>     end
>>
>> regards,
>>
>> On 31/05/2011 8:26 AM, Daniel Degasperi wrote:
>>> Hi,
>>> I've a problem with following filter:
>>>
>>> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
>>> <ogc:PropertyIsEqualTo matchCase="true">
>>> <ogc:PropertyName>localita</ogc:PropertyName>
>>> <ogc:Literal>1.102</ogc:Literal>
>>> </ogc:PropertyIsEqualTo>
>>> </ogc:Filter>
>>>
>>> Output:
>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>> <ows:ExceptionReport 
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>>> xmlns:ows="http://www.opengis.net/ows" version="1.1.0" 
>>> language="en-US" xsi:schemaLocation="http://www.opengis.net/ows 
>>> http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">
>>> <ows:Exception exceptionCode="mapserv" locator="NoApplicableCode">
>>> <ows:ExceptionText>msWFSGetFeature(): WFS server error. 
>>> FLTApplyFilterToLayer() failed
>>> msPostGISLayerWhichShapes(): Query error. Error (ERROR:  operator 
>>> does not exist: text = numeric
>>> LINE 1: ...6966392 4130435.36164853))',32632) and ( (localita= 1.102) )
>>>                                                              ^
>>> HINT:  No operator matches the given name and argument type(s). You 
>>> might need to add explicit type casts.
>>> ) executing query: select 
>>> "gc_objid","di_id","localita","di_name_1",encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex') 
>>> as geom,"gc_objid" from (SELECT  __data__.di_id as 
>>> gc_objid,__data__.the_geom, 
>>> __data__.di_id,__data__.localita,__data__.di_name_1 FROM 
>>> geo.district_area AS __data__) AS foo where the_geom &amp;&amp; 
>>> GeomFromText('POLYGON((-393764.596966392 
>>> 4130435.36164853,-393764.596966392 5936656.6234314,1412456.59042116 
>>> 5936656.6234314,1412456.59042116 4130435.36164853,-393764.596966392 
>>> 4130435.36164853))',32632) and ( (localita= 1.102) 
>>> )</ows:ExceptionText>
>>> </ows:Exception>
>>> </ows:ExceptionReport>
>>>
>>> It seems that the value 1.102 is not quoted. Should I add the 
>>> attribute xs:type="string" to the literal node or use the 
>>> PropertyIsLike condition?
>>>
>>> I'm using MapServer 5.6.6
>>>
>>> Best regards,
>>> Daniel
>>>
>>>
>>
>>
>
>


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: yassefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------




More information about the mapserver-users mailing list