private static RoofFrontDirection findDirection(OsmPrimitive pWay, Perspective pPerspective) { Vector2d direction = null; boolean soft = false; direction = findDirectionByRelation(pWay, pPerspective); if (direction != null) { return new RoofFrontDirection(direction, false); } if (pWay instanceof Way) { direction = findDirectionByPoints((Way) pWay, pPerspective); if (direction != null) { return new RoofFrontDirection(direction, soft); } } else { // TODO } return findDirectionByDirectionTag(pWay); }