In Version 1.11 you introduced braces in the WKT of MultiPoints
e.g. MULTIPOINT ((8 9), (4 5))
MySQL only accepts MULTIPOINT (8 9 , 4 5)
I suppose this is a bug in the MySQL Funktion MultiPointFromText, but maybe it is possible to remove the braces in JTS to support compatibiliy with older JTS versions.
Code in WKTWriter should be:
private void appendMultiPointText(MultiPoint multiPoint, int level, Writer writer)
throws IOException
{
if (multiPoint.isEmpty()) {
writer.write("EMPTY");
}
else {
writer.write("(");
for (int i = 0; i < multiPoint.getNumGeometries(); i++) {
if (i > 0) {
writer.write(", ");
indentCoords(i, level + 1, writer);
}
//writer.write("(");
appendCoordinate(((Point) multiPoint.getGeometryN(i)).getCoordinate(), writer);
//writer.write(")");
}
writer.write(")");
}
}
The OGC SFS standard requires the extra parentheses in MULTIPOINT. It doesn't seem right to reject the standard just to accomodate a MySQL bug.
You can always make a MySQLWKTWriter with the fix you suggest.