示例#1
0
 def __init__(self, mapfilename, dir=os.path.join('.','xmlData'), splitDir=os.path.join('.','osmData')) :
     try :
         self.mapID = reMap.match(mapfilename).group('name')
     except AttributeError :
         print('Error reading the map name from %s! Using default instead.' % (mapfilename))
         self.mapID = 'default'
     
     self.filename = os.path.join(dir, self.mapID + '.xml')
     SettingsFile.__init__(self, self.filename, rootTag=etree.Element('pyMkgmap', src="openstreetmap.org", obj="maps"), writeback=True, forceTag=True)
     
     self.setText(MapInfo.I_FILENAME_MAP, mapfilename)
     self.setText(MapInfo.I_DIR_SPLITS, os.path.join(splitDir, self.mapID))
示例#2
0
    def __init__(self,
                 mapfilename,
                 dir=os.path.join('.', 'xmlData'),
                 splitDir=os.path.join('.', 'osmData')):
        try:
            self.mapID = reMap.match(mapfilename).group('name')
        except AttributeError:
            print(
                'Error reading the map name from %s! Using default instead.' %
                (mapfilename))
            self.mapID = 'default'

        self.filename = os.path.join(dir, self.mapID + '.xml')
        SettingsFile.__init__(self,
                              self.filename,
                              rootTag=etree.Element('pyMkgmap',
                                                    src="openstreetmap.org",
                                                    obj="maps"),
                              writeback=True,
                              forceTag=True)

        self.setText(MapInfo.I_FILENAME_MAP, mapfilename)
        self.setText(MapInfo.I_DIR_SPLITS, os.path.join(splitDir, self.mapID))
示例#3
0
 def __init__(self, filename) :
     self.filename = filename
     SettingsFile.__init__(self, self.filename, rootTag=etree.Element('pyMkgmap', src="openstreetmap.org", obj="prog"), writeback=True, forceTag=True)
示例#4
0
 def __init__(self, filename) :
     self.filename = filename
     SettingsFile.__init__(self, self.filename, rootTag=etree.Element('pyMkgmap', src="openstreetmap.org", obj="prog"), writeback=True, forceTag=True)