This seems a direct clone of JTS.toPolygon(Envelope), including setting the CRS in the user data, can we avoid the duplication and just use JTS?