class JTS {

    public static Envelope toGeographic(final Envelope envelope, final CoordinateReferenceSystem crs)
            throws TransformException {
        if (CRS.equalsIgnoreMetadata(crs, DefaultGeographicCRS.WGS84)) {
            if( envelope instanceof ReferencedEnvelope){
                return envelope;
            }
            return ReferencedEnvelope.create( envelope,  DefaultGeographicCRS.WGS84 );
        }
        ReferencedEnvelope initial = ReferencedEnvelope.create( envelope, crs );
        return toGeographic( initial );
    }

    private  JTS();

}