Search in sources :

Example 1 with JTSPointArray

use of org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSPointArray in project geotoolkit by Geomatys.

the class JTSPositionFactory method createPositionList.

public List createPositionList(final float[] coordinates, final int start, final int end) {
    PointArray array = new JTSPointArray(crs);
    int N = crs.getCoordinateSystem().getDimension();
    for (int i = start; i < end; i += N) {
        double[] ords = new double[N];
        System.arraycopy(coordinates, i, ords, 0, N);
        array.add(createDirectPosition(ords));
    }
    return array;
}
Also used : JTSPointArray(org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSPointArray) PointArray(org.opengis.geometry.coordinate.PointArray) JTSPointArray(org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSPointArray)

Example 2 with JTSPointArray

use of org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSPointArray in project geotoolkit by Geomatys.

the class JTSPositionFactory method createPositionList.

public List createPositionList(final double[] coordinates, final int start, final int end) {
    PointArray array = new JTSPointArray(crs);
    int N = crs.getCoordinateSystem().getDimension();
    for (int i = start; i < end; i += N) {
        double[] ords = new double[N];
        System.arraycopy(coordinates, i, ords, 0, N);
        array.add(createDirectPosition(ords));
    }
    return array;
}
Also used : JTSPointArray(org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSPointArray) PointArray(org.opengis.geometry.coordinate.PointArray) JTSPointArray(org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSPointArray)

Aggregations

JTSPointArray (org.geotoolkit.geometry.isoonjts.spatialschema.geometry.geometry.JTSPointArray)2 PointArray (org.opengis.geometry.coordinate.PointArray)2