MapServer / MapServer-import

3 stars 2 forks source link

all procedures are returned when doing a GetObservation #2054

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: assefa Date: 2007/03/30 - 03:00

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.
tbonfort commented 12 years ago

Author: assefa Date: 2007/03/30 - 03:06

adding Tom in cc
tbonfort commented 12 years ago

Author: tomkralidis Date: 2007/03/30 - 03:44

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
tbonfort commented 12 years ago

Author: tomkralidis Date: 2007/03/30 - 20:18


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.
tbonfort commented 12 years ago

Author: Assefa Date: 2007/04/25 - 02:09 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

tbonfort commented 12 years ago

Author: tomkralidis Date: 2007/04/25 - 15:30

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.

tbonfort commented 12 years ago

Author: assefa Date: 2007/04/25 - 15:59 The GetCapbilities :

DescribeSensor

tbonfort commented 12 years ago

Author: tomkralidis Date: 2007/04/25 - 16:02 Works. As discussed off trac.