Polygon outerP = fac.createPolygon( null, crs, outer, null ); Polygon innerP = fac.createPolygon( null, crs, ring, null ); if ( outerP.contains( innerP ) ) { inners.add( ring ); } else { if ( inners.isEmpty() && innerP.contains( outerP ) ) { LOG.warn( "Reordering rings of polygon..." ); inners.add( outer );