//DimensionModel g1Dim = g1.getFeatGeometryFactory().getDimensionModel();
int g0Dim = g0.getCoordinateReferenceSystem().getCoordinateSystem().getDimension();
int g1Dim = g1.getCoordinateReferenceSystem().getCoordinateSystem().getDimension();
if (g0Dim != 2 || g1Dim != 2) {
//if (!g0Dim.is2D() || !g1Dim.is2D()) {
throw new UnsupportedDimensionException(
"This operation only works in 2D");
}
arg = new GeometryGraph[2];
arg[0] = new GeometryGraph(0, g0);