/* Build Ring from Curve */
ArrayList<OrientableCurve> curveList = new ArrayList<OrientableCurve>();
curveList.add(curve1);
// Build Ring then SurfaceBoundary then Surface
RingImpl exteriors = (RingImpl) primitiveFactory.createRing(curveList);
List<Ring> interiors = new ArrayList<Ring>();
SurfaceBoundary sboundary = primitiveFactory.createSurfaceBoundary(exteriors, interiors);
Surface surface1 = primitiveFactory.createSurface(sboundary);
Surface surface2 = (SurfaceImpl) surface1.transform(crs2);
// create expected result
PositionFactory expectedPosF2 = new PositionFactoryImpl(crs2, new PrecisionModel());
PrimitiveFactory expectedPrimF2 = new PrimitiveFactoryImpl(crs2, expectedPosF2);
GeometryFactory ExpectedGeomF2 = new GeometryFactoryImpl(crs2, expectedPosF2);
List<Position> expectedPoints = new ArrayList<Position>();
expectedPoints.add(expectedPrimF2.createPoint( new double[]{1187128.000000001, 395268.0000000004} ));
expectedPoints.add(expectedPrimF2.createPoint( new double[]{1187127.9999999998, 396026.99999999825} ));
expectedPoints.add(expectedPrimF2.createPoint( new double[]{1188245.0000000007, 396027.0000000039} ));
expectedPoints.add(expectedPrimF2.createPoint( new double[]{1188245.0000000005, 395268.0000000018} ));
expectedPoints.add(expectedPrimF2.createPoint( new double[]{1187128.000000001, 395268.0000000004} ));
LineString expectedLineString = ExpectedGeomF2.createLineString(expectedPoints);
List expectedCurveSegmentList = Collections.singletonList(expectedLineString);
CurveImpl expectedCurve = (CurveImpl) expectedPrimF2.createCurve(expectedCurveSegmentList);
/* Build Ring from Curve */
ArrayList<OrientableCurve> expectedCurveList = new ArrayList<OrientableCurve>();
expectedCurveList.add(expectedCurve);
// Build Ring then SurfaceBoundary then Surface
RingImpl exteriors2 = (RingImpl) expectedPrimF2.createRing(expectedCurveList);
List<Ring> interiors2 = new ArrayList<Ring>();
SurfaceBoundary sboundary2 = expectedPrimF2.createSurfaceBoundary(exteriors2, interiors2);
Surface expectedSurface = expectedPrimF2.createSurface(sboundary2);
//System.out.println(surface1);