private double[][][] geometryToSdeCoords(final Geometry jtsGeom,
final SeCoordinateReference seCRS) throws SeException, IOException {
int numParts;
double[][][] sdeCoords;
GeometryCollection gcol = null;
if (jtsGeom instanceof GeometryCollection) {
gcol = (GeometryCollection) jtsGeom;
} else {
Geometry[] geoms = { jtsGeom };
gcol = new GeometryFactory().createGeometryCollection(geoms);
}
List<SDEPoint> allPoints = new ArrayList<SDEPoint>();
numParts = gcol.getNumGeometries();
int[] partOffsets = new int[numParts];
Geometry geom;
for (int currGeom = 0; currGeom < numParts; currGeom++) {
partOffsets[currGeom] = allPoints.size();
geom = gcol.getGeometryN(currGeom);
Coordinate[] coords = geom.getCoordinates();
for (int i = 0; i < coords.length; i++) {
Coordinate c = coords[i];