Пример #1
0
    def __init__(self, leaf):

        self.file = Projection.leaf_to_string(leaf, "File")
        self.filetype = str.upper(Projection.leaf_to_string(leaf, "Type", 'shp'))
        self.draw = Projection.leaf_to_bool(leaf, "Draw", False)
        # self.path = self.readPolygon(self.file) if self.filetype != 'SHP' else None
        # if self.draw:
        self.path = ClipBorder.readPath(self.file, 0) if self.filetype != 'SHP' else None
        self.polygon = str.upper(Projection.leaf_to_string(leaf, "Polygon", 'on'))
        # self.draw = Projection.leaf_to_bool(leaf, "Draw", False)
        self.linewidth = Projection.leaf_to_float(leaf, "LineWidth", 1)
        self.linecolor = Projection.leaf_to_string(leaf, "LineColor", 'k')
Пример #2
0
    def __init__(self, leaf):

        self.file = Projection.leaf_to_string(leaf, "File")
        self.filetype = str.upper(
            Projection.leaf_to_string(leaf, "Type", 'shp'))
        self.draw = Projection.leaf_to_bool(leaf, "Draw", False)
        # self.path = self.readPolygon(self.file) if self.filetype != 'SHP' else None
        # if self.draw:
        self.path = ClipBorder.readPath(self.file,
                                        0) if self.filetype != 'SHP' else None
        self.polygon = str.upper(
            Projection.leaf_to_string(leaf, "Polygon", 'on'))
        # self.draw = Projection.leaf_to_bool(leaf, "Draw", False)
        self.linewidth = Projection.leaf_to_float(leaf, "LineWidth", 1)
        self.linecolor = Projection.leaf_to_string(leaf, "LineColor", 'k')
Пример #3
0
    def __init__(self, root):

        # 地图投影
        self.projection = Projection(root[0])

        # 边界集合
        bordersleaf = root[0].find('Borders').getchildren()
        self.borders = []
        for borderleaf in bordersleaf:
            self.borders.append(Border(borderleaf))

        # clip区域集合
        clipsleaf = root[0].find('ClipBorders').getchildren()
        self.clipborders = []
        for clipleaf in clipsleaf:
            self.clipborders.append(ClipBorder(clipleaf))

        # 站点文件
        from Stations import Stations
        self.stations = Stations(root[0])

        pass