/** * Populates the specified PointArray with the specified points. Any and all preexisting * points in the PointArray will be overwritten. * @param pointArray The PointArray to be populated. This must not be null. * @param dps The new array of points */ public static void populatePointArray(PointArray pointArray, DirectPosition[] dps) { pointArray.clear(); int count = dps.length; for (int i = 0; i < count; i++) { pointArray.add(dps[i]); } }
public void applyCRSOnChild() { if (controlPoints != null) { List<Position> newPositions = new ArrayList<Position>(); for (Position pos : controlPoints.positions()) { if (pos instanceof GeneralDirectPosition) { ((GeneralDirectPosition) pos).setCoordinateReferenceSystem(getCoordinateReferenceSystem()); newPositions.add(pos); } } controlPoints.clear(); controlPoints.addAll(newPositions); } }