コード例 #1
0
ファイル: csParse.py プロジェクト: AZed/uvcdat
 def startCoordinateTransform(self, attrs):
     name = _getatt(attrs, 'name')
     authority = _getatt(attrs, 'authority')
     transformType = _getatt(attrs, 'transformType')
     ctnode = cs.CoordinateTransformNode(name, authority, transformType)
     nsnode = self.peek()
     nsnode.setCoordinateTransform(ctnode)
     self.push(ctnode)
コード例 #2
0
 def startCoordinateTransform(self, attrs):
     name = _getatt(attrs, 'name')
     authority = _getatt(attrs, 'authority')
     transformType = _getatt(attrs, 'transformType')
     ctnode = cs.CoordinateTransformNode(name, authority, transformType)
     nsnode = self.peek()
     nsnode.setCoordinateTransform(ctnode)
     self.push(ctnode)
コード例 #3
0
 def startCoordinateAxisBoundary(self, attrs):
     ncnode = self.peek()
     name = _getatt(attrs, 'name')
     shape = _getatt(attrs, 'shape', default=None)
     datatype = _getatt(attrs, 'type')
     if shape is None:
         shapelist = None
     else:
         shapelist = string.split(shape)
     varnode = cs.CoordinateAxisBoundaryNode(name, datatype, shapelist)
     ncnode.setVariable(varnode)
     self.push(varnode)
コード例 #4
0
ファイル: csParse.py プロジェクト: AZed/uvcdat
 def startCoordinateAxisBoundary(self, attrs):
     ncnode = self.peek()
     name = _getatt(attrs, 'name')
     shape = _getatt(attrs, 'shape', default=None)
     datatype = _getatt(attrs, 'type')
     if shape is None:
         shapelist = None
     else:
         shapelist = string.split(shape)
     varnode = cs.CoordinateAxisBoundaryNode(name, datatype, shapelist)
     ncnode.setVariable(varnode)
     self.push(varnode)
コード例 #5
0
 def startVariable(self, attrs):
     ncnode = self.peek()
     name = _getatt(attrs, 'name')
     shape = _getatt(attrs, 'shape', default=None)
     datatype = _getatt(attrs, 'type')
     coordinateSystems = _getatt(attrs, 'coordinateSystems')
     if shape is None:
         shapelist = None
     else:
         shapelist = string.split(shape)
     varnode = cs.VariableNode(name, datatype, shapelist, coordinateSystems)
     ncnode.setVariable(varnode)
     self.push(varnode)
コード例 #6
0
ファイル: csParse.py プロジェクト: AZed/uvcdat
 def startVariable(self, attrs):
     ncnode = self.peek()
     name = _getatt(attrs, 'name')
     shape = _getatt(attrs, 'shape', default=None)
     datatype = _getatt(attrs, 'type')
     coordinateSystems = _getatt(attrs, 'coordinateSystems')
     if shape is None:
         shapelist = None
     else:
         shapelist = string.split(shape)
     varnode = cs.VariableNode(name, datatype, shapelist, coordinateSystems)
     ncnode.setVariable(varnode)
     self.push(varnode)
コード例 #7
0
ファイル: csParse.py プロジェクト: AZed/uvcdat
 def startCoordinateAxis(self, attrs):
     ncnode = self.peek()
     name = _getatt(attrs, 'name')
     shape = _getatt(attrs, 'shape', default=None)
     if shape is None:
         shapelist = None
     else:
         shapelist = string.split(shape)
     datatype = _getatt(attrs, 'type')
     units = _getatt(attrs, 'units')
     axis = _getatt(attrs, 'axis')
     axisType = None
     if axis is not None:
         try:
             axisType = cdToCsAxisType[string.lower(var.axis)]
         except:
             pass
     positive = _getatt(attrs, 'positive')
     boundaryRef = _getatt(attrs, 'bounds')
     varnode = cs.CoordinateAxisNode(name, datatype, units, shapelist, axisType, positive, boundaryRef)
     ncnode.setCoordinateAxis(varnode)
     self.push(varnode)
コード例 #8
0
 def startCoordinateAxis(self, attrs):
     ncnode = self.peek()
     name = _getatt(attrs, 'name')
     shape = _getatt(attrs, 'shape', default=None)
     if shape is None:
         shapelist = None
     else:
         shapelist = string.split(shape)
     datatype = _getatt(attrs, 'type')
     units = _getatt(attrs, 'units')
     axis = _getatt(attrs, 'axis')
     axisType = None
     if axis is not None:
         try:
             axisType = cdToCsAxisType[string.lower(var.axis)]
         except:
             pass
     positive = _getatt(attrs, 'positive')
     boundaryRef = _getatt(attrs, 'bounds')
     varnode = cs.CoordinateAxisNode(name, datatype, units, shapelist,
                                     axisType, positive, boundaryRef)
     ncnode.setCoordinateAxis(varnode)
     self.push(varnode)
コード例 #9
0
 def startNetcdf(self, attrs):
     uri = _getatt(attrs, 'uri')
     nc = cs.NetcdfNode(uri=uri)
     self.push(nc)
コード例 #10
0
ファイル: csParse.py プロジェクト: AZed/uvcdat
 def startCoordinateTransformRef(self, attrs):
     ref = _getatt(attrs, 'ref')
     csnode = self.peek()
     csnode.addCoordinateTransform(ref)
コード例 #11
0
 def startParameter(self, attrs):
     self.startAttribute(attrs)  # Parameters are attributes
     name = _getatt(attrs, 'name')
     self.peek().parameters[name].tag = 'parameter'
コード例 #12
0
 def startCoordinateSystem(self, attrs):
     name = _getatt(attrs, 'name')
     ncnode = self.peek()
     csnode = cs.CoordinateSystemNode(name)
     ncnode.setCoordinateSystem(csnode)
     self.push(csnode)
コード例 #13
0
 def startCoordinateTransformRef(self, attrs):
     ref = _getatt(attrs, 'ref')
     csnode = self.peek()
     csnode.addCoordinateTransform(ref)
コード例 #14
0
 def startCoordinateAxisRef(self, attrs):
     ref = _getatt(attrs, 'ref')
     csnode = self.peek()
     csnode.addCoordinateAxis(ref)
コード例 #15
0
ファイル: csParse.py プロジェクト: AZed/uvcdat
 def startCoordinateSystem(self, attrs):
     name = _getatt(attrs, 'name')
     ncnode = self.peek()
     csnode = cs.CoordinateSystemNode(name)
     ncnode.setCoordinateSystem(csnode)
     self.push(csnode)
コード例 #16
0
ファイル: csParse.py プロジェクト: AZed/uvcdat
 def startCoordinateAxisRef(self, attrs):
     ref = _getatt(attrs, 'ref')
     csnode = self.peek()
     csnode.addCoordinateAxis(ref)
コード例 #17
0
ファイル: csParse.py プロジェクト: AZed/uvcdat
 def startNetcdf(self, attrs):
     uri = _getatt(attrs, 'uri')
     nc = cs.NetcdfNode(uri=uri)
     self.push(nc)
コード例 #18
0
ファイル: csParse.py プロジェクト: AZed/uvcdat
 def startParameter(self, attrs):
     self.startAttribute(attrs)      # Parameters are attributes
     name = _getatt(attrs, 'name')
     self.peek().parameters[name].tag='parameter'