ring = gf.createLinearRing(subList(gf.getCoordinateSequenceFactory(), coords, GTYPE,
elemInfo, triplet, false));
} else if (INTERPRETATION == 3) {
// rectangle does not maintain measures
//
CoordinateSequence ext = subList(gf.getCoordinateSequenceFactory(), coords, GTYPE,
elemInfo, triplet, false);
Coordinate min = ext.getCoordinate(0);
Coordinate max = ext.getCoordinate(1);
ring = gf.createLinearRing(new Coordinate[] {
min, new Coordinate(max.x, min.y), max,
new Coordinate(min.x, max.y), min
});
} else if (INTERPRETATION == 4) {
// rectangle does not maintain measures
//
CoordinateSequence ext = subList(gf.getCoordinateSequenceFactory(), coords, GTYPE,
elemInfo, triplet, false);
if (ext.size() != 3) {
throw new IllegalArgumentException(
"The coordinate sequence for the circle creation must contain 3 points, the one at hand contains "
+ ext.size() + " instead");
}
double[] cp = new double[ext.size() * 2 + 2];
for (int i = 0; i < ext.size(); i++) {
cp[i * 2] = ext.getOrdinate(i, 0);
cp[i * 2 + 1] = ext.getOrdinate(i, 1);
}
// figure out the other point
CircularArc arc = new CircularArc(cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]);
ring = CurvedGeometries.toCircle(arc, gf, gf.getTolerance());
} else {