try {
if (geometry instanceof Point || gcol instanceof MultiPoint) {
shape.generatePoint(points.length, points);
} else if (geometry instanceof LineString || geometry instanceof MultiLineString) {
shape.generateLine(points.length, numParts, partOffsets, points);
} else {
shape.generatePolygon(points.length, numParts, partOffsets, points);
}
} catch (SeException e) {
ArcSdeException sdeEx = new ArcSdeException("Can't generate SeShape from " + geometry