root[0].get('maxlon'), root[0].get('maxlat')] if TIMER: tic() print "Downloading the osm data ... " osmDictionary = getOsmFile(args.boundingbox, args.osmFile, args.inputOsmFile) if TIMER: toc() if args.imageFile: if TIMER: tic() print "Building the image file ..." args.imageFile = args.directory + args.imageFile getMapImage(args.osmFile, args.imageFile) if TIMER: toc() #Initialize the class if TIMER: tic() osmRoads = Osm2Dict(args.boundingbox[0], args.boundingbox[1], osmDictionary, flags) print "Extracting the map data for gazebo ..." #get Road and model details roadPointWidthMap, modelPoseMap, buildingLocationMap = osmRoads.getMapDetails() if TIMER: toc() if TIMER:
def testFail(self): '''tests if no names for input and output files are specifed''' self.assertEqual(getMapImage('', ''), -1)
root[0].get('minlon'), root[0].get('minlat'), root[0].get('maxlon'), root[0].get('maxlat') ] if TIMER: tic() print "Downloading the osm data ... " osmDictionary = getOsmFile(args.boundingbox, args.osmFile, args.inputOsmFile) if TIMER: toc() if args.imageFile: if TIMER: tic() print "Building the image file ..." args.imageFile = args.directory + args.imageFile getMapImage(args.osmFile, args.imageFile) if TIMER: toc() #Initialize the class if TIMER: tic() osmRoads = Osm2Dict(args.boundingbox[0], args.boundingbox[1], osmDictionary, flags) print "Extracting the map data for gazebo ..." #get Road and model details roadPointWidthMap, modelPoseMap, buildingLocationMap = osmRoads.getMapDetails() if TIMER: toc() if TIMER:
def testPass(self): '''tests if the .png file opens correctly''' self.assertEqual(getMapImage('map.osm', 'map.png'), 0)