Ticket #2057 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

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

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

Change History

Changed 6 years ago by tomkralidis

  • cc tom.kralidis@… added

Changed 6 years ago by assefa

Coorected in r6119. Please close bug after testing.

Changed 6 years ago by tomkralidis

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)

Changed 6 years ago by tomkralidis

Changed 6 years ago by tomkralidis

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?

Changed 6 years ago by assefa

  • status changed from new to closed
  • resolution set to fixed

Made hanges to generate exception for invalid property names r6120.

Closing bug.

Note: See TracTickets for help on using tickets.