コード例 #1
0
 public static void setCoordinates(
     final double[] coordinates, final int axisCount, final int i, final Point point) {
   if (point != null && !point.isEmpty()) {
     for (int axisIndex = 0; axisIndex < axisCount; axisIndex++) {
       final double value = point.getCoordinate(axisIndex);
       coordinates[i * axisCount + axisIndex] = value;
     }
   }
 }
コード例 #2
0
 public static void setCoordinates(
     final GeometryFactory geometryFactory,
     final double[] coordinates,
     final int axisCount,
     final int vertexIndex,
     Point point) {
   if (geometryFactory != null) {
     point = point.convertGeometry(geometryFactory, axisCount);
   }
   for (int axisIndex = 0; axisIndex < axisCount; axisIndex++) {
     double value = point.getCoordinate(axisIndex);
     value = geometryFactory.makePrecise(axisIndex, value);
     coordinates[vertexIndex * axisCount + axisIndex] = value;
   }
 }