Changeset 1846 for TI02-CSML


Ignore:
Timestamp:
08/12/06 14:39:27 (13 years ago)
Author:
domlowe
Message:

classes for all features added (not yet done coverages for all features)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/branches/CSML2/csParser.py

    r1842 r1846  
    77#this map needs updating for V2 
    88etree._namespace_map.update({'http://www.opengis.net/om': 'om', 'http://www.opengis.net/swe': 'swe',  'http://www.opengis.net/gml': 'gml','http://ndg.nerc.ac.uk/csml' : 'csml', 'http://www.w3.org/1999/xlink':'xlink'}) 
    9  
    10          
    119 
    1210nsCSML = 'http://ndg.nerc.ac.uk/csml' 
     
    1816nsSWE='http://www.opengis.net/swe' 
    1917     
    20   
    21                  
    2218def myQName(uri,tag): 
    2319    return "{"+uri+"}"+tag 
     
    296292        addchildren(self,children) 
    297293 
    298 class PointDomain(DomainSet): 
     294class MultiPoint(csElement): 
     295    def __init__(self, **kwargs): 
     296        children={'pointMember':[GML('pointMember'), 'csString'],'pointMembers':[GML('pointMember'), 'csString']} 
     297        a=['srsDimension'] 
     298        addatts(self,a) 
     299        addchildren(self,children) 
     300 
     301class PointDomain(DomainSet, MultiPoint,csElement): 
    299302    def __init__(self, **kwargs): 
    300303        DomainSet.__init__(self,**kwargs) 
    301         children={'pointMember':[GML('pointMember'), 'csString']} 
     304        MultiPoint.__init__(self,**kwargs) 
     305        children={} 
    302306        addchildren(self,children) 
    303307 
     
    390394        addchildren(self,children) 
    391395 
     396#class AlternatePointFeature(AbstractFeature, csElement): 
     397    #def __init__(self, **kwargs): 
     398        #AbstractFeature.__init__(self,**kwargs) 
     399        #children={} 
     400        #addchildren(self,children) 
     401 
    392402class PointFeature(AbstractFeature, csElement): 
    393403    def __init__(self, **kwargs): 
     
    396406        addchildren(self,children) 
    397407 
     408class PointCollectionFeature(AbstractFeature, csElement): 
     409    def __init__(self, **kwargs): 
     410        AbstractFeature.__init__(self,**kwargs) 
     411        children={'time':[CSML('time'), 'csString'], 'value':[CSML('MultiPointCoverage'), 'MultiPointCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     412        addchildren(self,children) 
     413 
     414class PointSeriesFeature(AbstractFeature, csElement): 
     415    def __init__(self, **kwargs): 
     416        AbstractFeature.__init__(self,**kwargs) 
     417        children={'location':[CSML('location'), 'csString'], 'value':[CSML('PointSeriesCoverage'), 'PointSeriesCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     418        addchildren(self,children) 
     419 
    398420 
    399421class GridFeature(AbstractFeature, csElement): 
     
    403425        addchildren(self,children) 
    404426 
     427class GridSeriesFeature(AbstractFeature, csElement): 
     428    def __init__(self, **kwargs): 
     429        AbstractFeature.__init__(self,**kwargs) 
     430        children={'value':[CSML('GridSeriesCoverage'), 'GridSeriesCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     431        addchildren(self,children) 
     432 
     433class ProfileFeature(AbstractFeature, csElement): 
     434    def __init__(self, **kwargs): 
     435        AbstractFeature.__init__(self,**kwargs) 
     436        children={'time':[CSML('time'), 'csString'],'location':[CSML('location'), 'csString'], 'value':[CSML('ProfileCoverage'), 'ProfileCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     437        addchildren(self,children) 
     438 
     439class ProfileSeriesFeature(AbstractFeature, csElement): 
     440    def __init__(self, **kwargs): 
     441        AbstractFeature.__init__(self,**kwargs) 
     442        children={'location':[CSML('location'), 'csString'], 'value':[CSML('ProfileSeriesCoverage'), 'ProfileSeriesCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     443        addchildren(self,children) 
     444 
     445class RaggedProfileSeriesFeature(AbstractFeature, csElement): 
     446    def __init__(self, **kwargs): 
     447        AbstractFeature.__init__(self,**kwargs) 
     448        children={'location':[CSML('location'), 'csString'], 'profileLength':[CSML('profileLength'), 'csString'],'value':[CSML('ProfileSeriesCoverage'), 'ProfileSeriesCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     449        addchildren(self,children) 
     450 
     451class RaggedSectionFeature(AbstractFeature, csElement): 
     452    def __init__(self, **kwargs): 
     453        AbstractFeature.__init__(self,**kwargs) 
     454        children={'stationLocations':[CSML('stationLocations'), 'csString'], 'stationTimes':[CSML('stationTimes'), 'csString'],'profileLength':[CSML('profileLength'),'csString'],'value':[CSML('RaggedSectionCoverage'), 'RaggedSectionCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     455        addchildren(self,children) 
     456 
     457class SectionFeature(AbstractFeature, csElement): 
     458    def __init__(self, **kwargs): 
     459        AbstractFeature.__init__(self,**kwargs) 
     460        children={'stationLocations':[CSML('stationLocations'), 'csString'], 'stationTimes':[CSML('stationTimes'), 'csString'],'value':[CSML('SectionCoverage'), 'SectionCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     461        addchildren(self,children) 
     462 
     463class ScanningRadarFeature(AbstractFeature, csElement): 
     464    def __init__(self, **kwargs): 
     465        AbstractFeature.__init__(self,**kwargs) 
     466        children={'elevation':[CSML('elevation'), 'csString'], 'value':[CSML('ScanningRadarCoverage'), 'ScanningRadarCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     467        addchildren(self,children) 
     468 
     469class SwathFeature(AbstractFeature, csElement): 
     470    def __init__(self, **kwargs): 
     471        AbstractFeature.__init__(self,**kwargs) 
     472        children={'eqCrossLon':[CSML('eqCrossLon'), 'csString'],'eqCrossTime':[CSML('eqCrossTime'), 'csString'], 'value':[CSML('ReferenceableGridCoverage'), 'ReferenceableGridCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     473        addchildren(self,children) 
     474 
     475class TrajectoryFeature(AbstractFeature, csElement): 
     476    def __init__(self, **kwargs): 
     477        AbstractFeature.__init__(self,**kwargs) 
     478        children={'value':[CSML('TrajectoryCoverage'), 'TrajectoryCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     479        addchildren(self,children) 
    405480 
    406481         
Note: See TracChangeset for help on using the changeset viewer.