Opened 18 years ago
Closed 17 years ago
#1754 closed defect (fixed)
[OGC:SOS] add gml_featureid to LAYER/METADATA for GetObservation output
Reported by: | tomkralidis | Owned by: | assefa |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | SOS Server | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Many samples/observations have id's associated with them. We should allow for gml_featureid in LAYER/METADATA, i.e.: "gml_featureid" "SAMPLE_NU" ...which would be as per: http://mapserver.gis.umn.edu/docs/howto/wfs_server ...which would take the value from the record and apply it as the feature id as per below: <om:result> <gml:featureMember> <NS01EE0014 gml:id="some_id_value">
Attachments (1)
Change History (8)
comment:4 by , 17 years ago
Path seems correct with the following changes :
if (j<lp->numitems)
xmlNewNsProp(psNode, psNsGml, BAD_CAST "id", BAD_CAST sShape.values[j]);
and : should the featureid be only valid for SOS_featureid or is it also valid for GML_featureid and OWS_XXX. If that is the case, It should be changed to OSG and look like this :
msOWSLookupMetadata(&(lp->metadata), "OFG", "featureid");
comment:5 by , 17 years ago
Thanks. When I apply:
if (j<lp->numitems)
...and set the lookup to OSG, nothing ever comes out, ever. Does this work for you? I'm not sure of what this line does?
comment:6 by , 17 years ago
I have tested it now locally :
pszFeatureId = msOWSLookupMetadata(&(lp->metadata), "OSG", "featureid"); works for me. (using "ows/sos/gml_featureid" "SAMPLE_NU")
the if shoudl be changed to open the layer, get items and you beed to add a layer close at the end
if(pszFeatureId && msLayerOpen(lp) == MS_SUCCESS && msLayerGetItems(lp) == MS_SUCCESS)
{ /* find the featureid amongst the items for this layer */
for(j=0; j<lp->numitems; j++) {
if(strcasecmp(lp->items[j], pszFeatureId) == 0) { /* found it */
break;
}
} if (j<lp->numitems)
xmlNewNsProp(psNode, psNsGml, BAD_CAST "id", BAD_CAST sShape.values[j]);
msLayerClose(lp);
}
if(pszFeatureId && msLayerOpen(lp) == MS_SUCCESS && msLayerGetItems(lp) == MS_SUCCESS)
comment:7 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
That seems to have worked. Thanks. Committed to trunk.