class PropertyReaderUtils {

    public static List<Point2D> getControlPoints(DefinitionResolver definitionResolver,
                                                 String edgeId) {
        final double resolutionFactor = definitionResolver.getResolutionFactor();
        final List<Point> waypoint = definitionResolver.getEdge(edgeId).getWaypoint();
        final List<Point2D> result = new ArrayList<>();
        if (waypoint.size() > 2) {
            List<Point> points = waypoint.subList(1,
                                                  waypoint.size() - 1);
            for (Point p : points) {
                result.add(createPoint2D(p, resolutionFactor));
            }
        }
        return result;
    }

}