use of com.revolsys.geometry.model.impl.LineStringDouble in project com.revolsys.open by revolsys.
the class GeoJsonGeometryReader method readPointCoordinatesList.
private LineString readPointCoordinatesList() {
final JsonParser parser = this.in;
final double[] values = parser.getDoubleArray();
if (values == null) {
return null;
} else {
return new LineStringDouble(values.length, values);
}
}
use of com.revolsys.geometry.model.impl.LineStringDouble in project com.revolsys.open by revolsys.
the class GmlGeometryReader method toCoordinateList.
public static LineString toCoordinateList(final int axisCount, final List<double[]> listOfCoordinateArrays) {
final int vertexCount = listOfCoordinateArrays.size();
final double[] coordinates = new double[vertexCount * axisCount];
for (int i = 0; i < vertexCount; i++) {
final double[] coordinates2 = listOfCoordinateArrays.get(i);
for (int j = 0; j < axisCount; j++) {
final double value;
if (j < coordinates2.length) {
value = coordinates2[j];
} else {
value = Double.NaN;
}
coordinates[i * axisCount + j] = value;
}
}
return new LineStringDouble(axisCount, coordinates);
}
Aggregations