Package com.spatial4j.core.shape.jts

Examples of com.spatial4j.core.shape.jts.JtsGeometry.validate()


    final boolean dateline180Check = getDatelineRule() != DatelineRule.none;
    JtsGeometry jtsGeom;
    try {
      jtsGeom = ctx.makeShape(geometry, dateline180Check, ctx.isAllowMultiOverlap());
      if (isAutoValidate())
        jtsGeom.validate();
    } catch (RuntimeException e) {
      //repair:
      if (validationRule == ValidationRule.repairConvexHull) {
        jtsGeom = ctx.makeShape(geometry.convexHull(), dateline180Check, ctx.isAllowMultiOverlap());
      } else if (validationRule == ValidationRule.repairBuffer0) {
View Full Code Here


    protected JtsGeometry jtsGeometry(Geometry geom) {
        //dateline180Check is false because ElasticSearch does it's own dateline wrapping
        JtsGeometry jtsGeometry = new JtsGeometry(geom, SPATIAL_CONTEXT, false, multiPolygonMayOverlap);
        if (autoValidateJtsGeometry)
            jtsGeometry.validate();
        if (autoIndexJtsGeometry)
            jtsGeometry.index();
        return jtsGeometry;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.