/** * Extracts a {@link CurvedGeometryFactory} from the provided geometry, either by just returning * the one that is held by the geometry, if consistent with its tolerance, or by creating a new * one * * @param curved * @return */ public static CurvedGeometryFactory getFactory(CurvedGeometry<?> curved) { GeometryFactory factory = ((Geometry) curved).getFactory(); if (factory instanceof CurvedGeometryFactory) { CurvedGeometryFactory cf = (CurvedGeometryFactory) factory; if (cf.getTolerance() == curved.getTolerance()) { return cf; } } return new CurvedGeometryFactory(factory, curved.getTolerance()); } }
ring = CurvedGeometries.toCircle(arc, gf, gf.getTolerance()); } else { throw new IllegalArgumentException(