本文整理汇总了Python中Path.Path.buildingInfo方法的典型用法代码示例。如果您正苦于以下问题:Python Path.buildingInfo方法的具体用法?Python Path.buildingInfo怎么用?Python Path.buildingInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Path.Path
的用法示例。
在下文中一共展示了Path.buildingInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getCustomPath
# 需要导入模块: from Path import Path [as 别名]
# 或者: from Path.Path import buildingInfo [as 别名]
def getCustomPath(latitude, longitude, end_place):
startCoord = Coordinate()
startCoord.latitude = latitude
startCoord.longitude = longitude
#Get all coordinate in the database for our end place
end_coordinates = Coordinate.getAllForBuilding(end_place)
if len(end_coordinates) == 0:
raise Exception(end_place + " is not a building in our database")
#Figure out the two closest coordinates
(startCoord, endCoord) = DB.getClosestCoords([startCoord], end_coordinates)
#Find all floor plans for our end place
#floorPlans = []
#floors = Floor.getAllForBuilding(end_place)
#for floor in floors:
# floorPlans.append(floor.floor_map)
#Get building information for our end place
building = Building()
building.loadFromID(end_place)
#Build path object to pass back
path = Path()
path.startCoord = startCoord.__dict__
path.endCoord = endCoord.__dict__
path.floorPlans = building.floorPlans
path.buildingInfo = building.__dict__
return path.__dict__