int srid = geometry.getSRID();
int dim = geometry.getCoordinateDimension();
double[] points = getPoints(geometry.getPoints());
int[] elemInfo = new int[]{1, 1, geometry.getNumPoints()};
int gtype = dim * 1000 + (geometry.isMeasured() ? dim : 0) * 100 + GTYPE_MULTIPOINT;
return new JGeometry(gtype, srid, elemInfo, points);
}