Пример #1
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)
Пример #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
 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
 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
 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
 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
 def startCoordinateSystem(self, attrs):
     name = _getatt(attrs, 'name')
     ncnode = self.peek()
     csnode = cs.CoordinateSystemNode(name)
     ncnode.setCoordinateSystem(csnode)
     self.push(csnode)
Пример #16
0
 def startCoordinateAxisRef(self, attrs):
     ref = _getatt(attrs, 'ref')
     csnode = self.peek()
     csnode.addCoordinateAxis(ref)
Пример #17
0
 def startNetcdf(self, attrs):
     uri = _getatt(attrs, 'uri')
     nc = cs.NetcdfNode(uri=uri)
     self.push(nc)
Пример #18
0
 def startParameter(self, attrs):
     self.startAttribute(attrs)      # Parameters are attributes
     name = _getatt(attrs, 'name')
     self.peek().parameters[name].tag='parameter'