Exemplo n.º 1
0
 def __open(self):
     self.dataObj = shp_file(self.dataPath)
     self.header = self.dataObj.header
     self.bbox = self.dataObj.bbox
     try:
         self.type = STRING_TO_TYPE[self.dataObj.type()]
     except KeyError:
         raise TypeError("%s does not support shapes of type: %s" % (self.__class__.__name__, self.dataObj.type()))
Exemplo n.º 2
0
 def __open(self):
     self.dataObj = shp_file(self.dataPath)
     self.header = self.dataObj.header
     self.bbox = self.dataObj.bbox
     try:
         self.type = STRING_TO_TYPE[self.dataObj.type()]
     except KeyError:
         raise TypeError('%s does not support shapes of type: %s' %
                         (self.__class__.__name__, self.dataObj.type()))
Exemplo n.º 3
0
 def __firstWrite(self, shape):
     self.type = TYPE_TO_STRING[type(shape)]
     if self.type == 'POINT':
         if len(shape) == 3:
             self.type = 'POINTM'
         if len(shape) == 4:
             self.type = 'POINTZ'
     self.dataObj = shp_file(self.dataPath, 'w', self.type)
     self.write = self.__writer
     self.write(shape)
Exemplo n.º 4
0
 def __firstWrite(self, shape):
     self.type = TYPE_TO_STRING[type(shape)]
     if self.type == 'POINT':
         if len(shape) == 3:
             self.type = 'POINTM'
         if len(shape) == 4:
             self.type = 'POINTZ'
     self.dataObj = shp_file(self.dataPath, 'w', self.type)
     self.write = self.__writer
     self.write(shape)
Exemplo n.º 5
0
 def __firstWrite(self, shape):
     self.type = TYPE_TO_STRING[type(shape)]
     if self.type == "POINT":
         if len(shape) == 3:
             self.type = "POINTM"
         if len(shape) == 4:
             self.type = "POINTZ"
     self.dataObj = shp_file(self.dataPath, "w", self.type)
     self.write = self.__writer
     self.write(shape)