UAV Trajectory Optimization in Urban Environments Using Energy–Distance Maps