Ignore:
Timestamp:
23/03/09 13:06:29 (12 years ago)
Author:
domlowe
Message:

typename parameter enabled in WFS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/service/imps/csmlbackend/wfs_csmllayer.py

    r4912 r5131  
    6767            featureset.featureinstances[feature.id]=CSMLFeatureInstance(title, abstract, feature)              
    6868        for id, instance in featureset.featureinstances.iteritems(): 
    69             ftype='csml:' + instance.featuretype 
     69            ftype=instance.featuretype #namespaced type e.g. 'csml:PointSeriesFeature' 
    7070            if ftype not in layermap.keys(): 
    7171                layermap[ftype]=CSMLwfsLayer(ftype, instance.wgs84BBox) 
     
    232232        self.abstract=abstract 
    233233        self._feature=feature 
    234         self.featuretype=self._feature.__class__.__name__ 
     234        self.featuretype='csml:'+self._feature.__class__.__name__ 
    235235        try: 
    236236            bb= self._feature.getCSMLBoundingBox().getBox() 
     
    244244    def toGML(self): 
    245245        """ Create a GML (CSML) representation of the feature """ 
    246         qualifiedFeatureType='{http://ndg.nerc.ac.uk/csml}' + self.featuretype 
     246        nonamespaceFType=self.featuretype.split(':')[1] #remove the csml: prefix 
     247        qualifiedFeatureType='{http://ndg.nerc.ac.uk/csml}' + nonamespaceFType 
    247248        emptyelem=etree.Element(qualifiedFeatureType) 
    248249        csmlelem=self._feature.toXML(emptyelem) 
Note: See TracChangeset for help on using the changeset viewer.