if (geom instanceof Point) {
if (geom.isEmpty()) { return org.postgis.Geometry.GEOMETRYCOLLECTION; } else if (geom instanceof Point) {
    public static int getWKBType(Geometry geom) {        if (geom instanceof Point) {            return org.postgis.Geometry.POINT;        } else if (geom instanceof com.vividsolutions.jts.geom.LineString) {            return org.postgis.Geometry.LINESTRING;        } else if (geom instanceof com.vividsolutions.jts.geom.Polygon) {            return org.postgis.Geometry.POLYGON;        } else if (geom instanceof MultiPoint) {            return org.postgis.Geometry.MULTIPOINT;        } else if (geom instanceof MultiLineString) {            return org.postgis.Geometry.MULTILINESTRING;        } else if (geom instanceof com.vividsolutions.jts.geom.MultiPolygon) {            return org.postgis.Geometry.MULTIPOLYGON;        } else if (geom instanceof com.vividsolutions.jts.geom.GeometryCollection) {            return org.postgis.Geometry.GEOMETRYCOLLECTION;        } else {            throw new IllegalArgumentException("Unknown Geometry Type: " + geom.getClass().getName());        }    }