/** * Returns the rule used to handle errors when creating a JTS {@link Geometry}, particularly after it has been * read from one of the {@link ShapeReader}s. */ @Deprecated public ValidationRule getValidationRule() { return getShapeFactory().getValidationRule(); }
try { jtsGeom = makeShape(geom); if (getValidationRule() != ValidationRule.none) jtsGeom.validate(); } catch (RuntimeException e) { if (getValidationRule() == ValidationRule.repairConvexHull) { jtsGeom = makeShape(geom.convexHull()); } else if (getValidationRule() == ValidationRule.repairBuffer0) { jtsGeom = makeShape(geom.buffer(0)); } else {