setSridRecurse(result.getGeometryN(i), srid);
setSridRecurse(geom.getGeometryN(i), srid); } } else if (geom instanceof Polygon) { Polygon poly = (Polygon) geom; poly.getExteriorRing().setSRID(srid); final int subcnt = poly.getNumInteriorRing(); for (int i = 0; i < subcnt; i++) { poly.getInteriorRingN(i).setSRID(srid);
    public static void setSridRecurse(final Geometry result, final int srid) {        result.setSRID(srid);        if (result instanceof GeometryCollection) {            final int subcnt = result.getNumGeometries();            for (int i = 0; i < subcnt; i++) {                setSridRecurse(result.getGeometryN(i), srid);            }        }    }