public static Polygon createPolygon(
final DirectPosition[] exteriorRingPoints,
final DirectPosition[][] interiorRingsPoints) {
final CoordinateReferenceSystem crs = exteriorRingPoints[0].getCoordinateReferenceSystem();
final BasicFactories commonFactory = BasicFactories.getDefault();
final GeometryFactory geometryFactory = commonFactory.getGeometryFactory(crs);
final PrimitiveFactory primitiveFactory = commonFactory.getPrimitiveFactory(crs);
final Ring exteriorRing = createRing(primitiveFactory, exteriorRingPoints);
List interiorRingList = interiorRingsPoints.length == 0 ?
Collections.EMPTY_LIST :