def __init__(self, area_id=None, lines=None, left=None, right=None, **kargs): super(Boundary, self).__init__(**kargs) self.area_id = area_id self.ilist = Ilist() self.lines = lines if lines: if len(lines) != len(left) or len(lines) != len(right): str_err = "Left and right must have the same length of lines" raise ValueError(str_err) self.left = Ilist() self.right = Ilist() # geometry type self.gtype = libvect.GV_BOUNDARY
def boundaries(self): """Creates list of boundaries for given area. int Vect_get_area_boundaries(const struct Map_info *Map, int area, struct ilist *List) """ ilist = Ilist() libvect.Vect_get_area_boundaries(self.c_mapinfo, self.id, ilist.c_ilist) return ilist
def boundaries(self): ilist = Ilist() libvect.Vect_get_isle_boundaries(self.c_mapinfo, self.id, ilist.c_ilist) return ilist
def boundaries(self): """Returna Ilist object with the line id""" bounds = Ilist() libvect.Vect_get_area_boundaries(self.c_mapinfo, self.area_id, bounds.c_ilist) return bounds