public static Geometry getGeometryN ( Geometry geometry , Integer n ) throws SQLException { if ( geometry == null ) { return null ; } if ( n >= 1 && n <= geometry . getNumGeometries ( ) ) { return geometry . getGeometryN ( n - 1 ) ; } else { throw new SQLException ( OUT_OF_BOUNDS_ERR_MESSAGE ) ; } }
Return Geometry number n from the given GeometryCollection .