Opened 17 years ago
Closed 17 years ago
#2054 closed defect (fixed)
all procedures are returned when doing a GetObservation
Reported by: | assefa | Owned by: | assefa |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | SOS Server | Version: | 5.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
There's an issue w/ sos_procedure and GetObservation: When testing against my local build/data: When I define, in LAYER/METADATA: "sos_procedure" "NS01EE0014 NS01EH0047" ...this behaves and works as agreed upon and expected for GetCapabilities and DescribeSensor. When I do a GetObservation, however, here's a snippet of what I get back: <om:member> <om:Observation> <time>1990-04-09 00:00:0</time> <om:procedure xlink:href="urn:ogc:def:procedure:NS01EE0014 NS01EH0047"/> <observedProperty>WaterQuality</observedProperty> <om:result> <gml:featureMember> <observations> <gml:boundedBy> <gml:Envelope> <gml:lowerCorner srsName="EPSG:4326">-65.0483 44.4619</gml:lowerCorner> <gml:upperCorner srsName="EPSG:4326">-65.0483 44.4619</gml:upperCorner> </gml:Envelope> </gml:boundedBy> <msGeometry> <gml:Point srsName="EPSG:4326"> <gml:coordinates>-65.0483,44.4619</gml:coordinates> </gml:Point> </msGeometry> <SampleNumber>1990000166</SampleNumber> <SiteIdentifier>NS01EE0014</SiteIdentifier> <dissolved_ammonium>-1.000</dissolved_ammonium> <dissolved_carbon_i>0.500</dissolved_carbon_i> <dissolved_carbon_o>8.200</dissolved_carbon_o> <colour>90.000</colour> <dissolved_nitrogen_no>0.010</dissolved_nitrogen_no> <total_nitrogen>0.160</total_nitrogen> <turbidity>0.400</turbidity> <time>1990-04-09 00:00:0</time> </observations> </gml:featureMember> </om:result> </om:Observation> </om:member> As you can see in om:member/om:Observation/om:procdure, the ENTIRE sos_procedure string is pushed out, even though really this om:member is from procedure NS01EE0014.
Change History (7)
comment:2 by , 17 years ago
Options: - pass pszProdedure in msSOSGetObservation() to the code which then calls msSOSAddMemberNode() - when a match is found while looping (via sos_procedure OR sos_procedure_item), then break and set the procedure ID and pass to msSOSAddMemberNode() This would work for requests which pass single procedure parameters. Are we supporting procedure parameters passed as lists? If yes, then we need some more logic to pass these lists and match them up on output O
comment:3 by , 17 years ago
Update: sos_procedure, as defined as a space seperated list of procedures, is to be applied to GetCapabilities and DescribeSensor requests only, so that MapServer, if sos_procedure is defined, can quickly process as opposed to processing through the dataset. So, even if sos_procedure_item is defined, it's not used for GetCapabilities and DescribeSensor For GetObservation, sos_procedure cannot be used in all cases. In the case of a GetObservation request with no procedure parameter passed, sos_procedure would be passed as a whole. So, upon discussion with Assefa, we realize that sos_procedure_item MUST be defined for GetObservation request. for msSOSGetObservation(), the code shall first check if sos_procedure_item is defined. If not, an ExceptionReport should be returned. If sos_procedure_item is defined, then MapServer will output the procedure per member as per the value in that column foreach record.
comment:4 by , 17 years ago
I would like to make a comment regarding the last update :
for GetObservation, I think It should be valid only to define an sos_procedure and not sos_procedure_item. This could be the case where we have one procedure per layer. So if the sos_prodecure_item is not define we can just output what there is in sos_procedure
What do you think about this ?
I have made the changes in cvs so that It uses the procedure_item for each feature if defined.
I will wait on TomK comments to see if we should clsoe this bug
comment:5 by , 17 years ago
So, for GetObservation, if sos_procedure_item is defined, then use it to look up and match the procedures to the observations. If sos_procedure_item is not defined, then apply the entire sos_procedure value to the procedure of the observation.
This is okay with me for GetObservation, however how does this impact GetCapabilities and DescribeSensor? Remember we put sos_procedure as a list string for these operations to use as opposed to running through an entire table.
comment:6 by , 17 years ago
The GetCapbilities :
- check first sos_procedure if found use it. If not found look for procedure_item. L
- check first sos_procedure if found use it. If not found look for procedure_item.
case 1 : only procedure is defined : check in sos_procedure to match the procedure with the layer. When outputing the <member/procedure> output the value of the metadata case 2 : only procedure_item is defined : use the sos_procedure_item and do a query on the layer to match the procedure with the layer. When outputing the <member/procedure> use the procedure_item as a way to only output the attribute value corresponding to the feature.
case 3 : both are defined. check in sos_procedure to match the procedure with the layer. When outputing the <member/procedure> use the procedure_item as a way to only output the attribute value corresponding to the feature.