Changeset 6138
- Timestamp:
- 15/12/09 13:53:37 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cows/trunk/cows/service/imps/csmlbackend/wfs_csmllayer.py
r5916 r6138 18 18 from shapely.geometry import Polygon, Point 19 19 from cows.bbox_util import union 20 from csml.csmllibs.csmlextra import listify, stringify, cleanString2 20 21 21 22 import logging … … 257 258 log.debug('there is a problem getting the bounding box for feature id %s'%self._feature.id) 258 259 self.wgs84BBox=() 260 261 def _fixXlinks(self): 262 ''' replaces xlinks in feature domain with inline content''' 263 for att in ['gridSeriesDomain', 'pointDomain', 'profileSeriesDomain','sectionDomain','trajectoryDomain']: 264 if hasattr(self._feature.value, att): 265 domain=getattr(self._feature.value,att) 266 for ordinate in listify(domain.coordTransformTable.gridOrdinates): 267 #insertedExtract is the 'hidden' resolved xlink data, expose inline 268 if hasattr(ordinate.coordAxisValues, 'insertedExtract'): 269 ordinate.coordAxisValues.CONTENT=cleanString2(str(ordinate.coordAxisValues.insertedExtract.getData()[0].tolist())) 270 259 271 def toGML(self): 260 272 """ Create a GML (CSML) representation of the feature """ … … 262 274 qualifiedFeatureType='{http://ndg.nerc.ac.uk/csml}' + nonamespaceFType 263 275 emptyelem=etree.Element(qualifiedFeatureType) 276 #modify self._feature so that any references to xlinks are replaced with inline content 277 self._fixXlinks() 264 278 csmlelem=self._feature.toXML(emptyelem) 265 279 return etree.tostring(csmlelem)
Note: See TracChangeset
for help on using the changeset viewer.