Opened 17 years ago

Closed 17 years ago

#2057 closed defect (fixed)

attribute filter column name mapping problem

Reported by: assefa Owned by: mapserverbugs
Priority: high Milestone:
Component: SOS Server Version: 5.0
Severity: normal Keywords:
Cc:

Description

In the  SOS layer definition, the user has the possiblity to use _alias_ fro
colum names.

When doing a GetObservation (using ogc filter), we should make sure that the
column names passed be modified to reflect the real column names in the data

Attachments (1)

mapogcsos.c-trac2057.patch (1.5 KB ) - added by tomkralidis 17 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by tomkralidis, 17 years ago

Cc: tom.kralidis@… added

comment:2 by assefa, 17 years ago

Coorected in r6119. Please close bug after testing.

comment:3 by tomkralidis, 17 years ago

Tested. Works with either the native col name:

http://devgeo.cciw.ca/cgi-bin/mapserv/sostest?service=SOS&version=0.1.2&request=GetObservation&offering=Water&observedproperty=WaterQuality&responseFormat=text/xml;%20subtype=om/0.14.7&result=<Filter><PropertyIsEqualTo><PropertyName>CONDUCTANC</PropertyName><Literal>26.4</Literal></PropertyIsEqualTo></Filter>

...or the specified _alias_ name:

http://devgeo.cciw.ca/cgi-bin/mapserv/sostest?service=SOS&version=0.1.2&request=GetObservation&offering=Water&observedproperty=WaterQuality&responseFormat=text/xml;%20subtype=om/0.14.7&result=<Filter><PropertyIsEqualTo><PropertyName>conductance</PropertyName><Literal>26.4</Literal></PropertyIsEqualTo></Filter>

Assefa: when I enter a column name that does not exist, I get an empty response:

http://devgeo.cciw.ca/cgi-bin/mapserv/sostest?service=SOS&version=0.1.2&request=GetObservation&offering=Water&observedproperty=WaterQuality&responseFormat=text/xml;%20subtype=om/0.14.7&result=<Filter><PropertyIsEqualTo><PropertyName>foo</PropertyName><Literal>26.4</Literal></PropertyIsEqualTo></Filter>

...when this should return a service exception saying something like "component name foo does not exist" (i.e. an InvalidParameterValue)

by tomkralidis, 17 years ago

Attachment: mapogcsos.c-trac2057.patch added

comment:4 by tomkralidis, 17 years ago

Think I figured it out. The attached patch returns an exception if the column alias is not found.

Assefa: can you let me know if this is correct or if we are missing anything?

comment:5 by assefa, 17 years ago

Resolution: fixed
Status: newclosed

Made hanges to generate exception for invalid property names r6120.

Closing bug.

Note: See TracTickets for help on using tickets.