Examples of relate()


Examples of com.spatial4j.core.shape.Rectangle.relate()

      Point pCtr = pLL(-20, 84);
      Point pTgt = pLL(-42, 15);
      assertTrue(dc().distance(pCtr, pTgt) < d);
      //since the pairwise distance is less than d, a bounding box from ctr with d should contain pTgt.
      Rectangle r = dc().calcBoxByDistFromPt(pCtr, d, ctx, null);
      assertEquals(SpatialRelation.CONTAINS,r.relate(pTgt));
      checkBBox(pCtr,d);
    }

    assertEquals("0 dist, horiz line",
        -45,dc().calcBoxByDistFromPt_yHorizAxisDEG(ctx.makePoint(-180, -45), 0, ctx),0);
View Full Code Here

Examples of com.spatial4j.core.shape.Shape.relate()

    factory.validationRule = JtsWktShapeParser.ValidationRule.repairConvexHull;
    ctx = factory.newSpatialContext();
    Shape cvxHull = ctx.readShapeFromWkt(wkt);
    assertTrue(cvxHull.getArea(ctx) > 0);

    assertEquals(SpatialRelation.CONTAINS, cvxHull.relate(buffer0));

    factory = new JtsSpatialContextFactory();
    factory.validationRule = JtsWktShapeParser.ValidationRule.none;
    ctx = factory.newSpatialContext();
    ctx.readShapeFromWkt(wkt);//doesn't throw
View Full Code Here

Examples of com.spatial4j.core.shape.Shape.relate()

            assert values.size() == 2;
            leftShape = SpatialContext.GEO.makePoint((Double) values.get(0), (Double) values.get(1));
        } else {
            leftShape = (Shape)left;
        }
        return leftShape.relate((Shape) right) == SpatialRelation.WITHIN;
    }

    @Override
    public FunctionInfo info() {
        return info;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.relate()

    static public boolean relatePattern(Geometry arg0, Geometry arg1,
            String arg2) {
        Geometry _this = arg0;

        return _this.relate(arg1, arg2);
    }

    static public String relate(Geometry arg0, Geometry arg1) {
        Geometry _this = arg0;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.relate()

    }

    static public String relate(Geometry arg0, Geometry arg1) {
        Geometry _this = arg0;

        return _this.relate(arg1).toString();
    }

    static public Geometry bufferWithSegments(Geometry arg0, double arg1,
            int arg2) {
        Geometry _this = arg0;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.relate()

     static public boolean relatePattern(Geometry arg0,Geometry arg1,String arg2)
     {
           if (arg0 == null || arg1 == null || arg2 == null) return false;
           Geometry _this = arg0;

           return _this.relate(arg1,arg2);
     }

     static public String relate(Geometry arg0,Geometry arg1)
     {
           if (arg0 == null || arg1 == null) return null;
View Full Code Here

Examples of com.vividsolutions.jts.geom.Geometry.relate()

     static public String relate(Geometry arg0,Geometry arg1)
     {
           if (arg0 == null || arg1 == null) return null;
           Geometry _this = arg0;

           return _this.relate(arg1).toString();
     }

   

     static public Geometry bufferWithSegments(Geometry arg0, Double arg1, Integer arg2)
View Full Code Here

Examples of com.vividsolutions.jts.geom.Polygon.relate()

        for (Ring ring : holes) {
            LinearRing linearRing = factory.createLinearRing(toCoordinates(ring.geometry));
            Polygon polygon = factory.createPolygon(linearRing, new LinearRing[0]);
            for (Iterator<Polygon> it = polygonHoles.iterator(); it.hasNext();) {
                Polygon otherHole = it.next();
                if (otherHole.relate(polygon, "F***1****")) {
                    polygon = (Polygon) polygon.union(otherHole);
                    it.remove();
                }
            }
            polygonHoles.add(polygon);
View Full Code Here

Examples of org.apache.cayenne.lifecycle.relationship.ObjectIdRelationshipHandler.relate()

        ObjectContext context = runtime.newContext();
        AuditableChildUuid ac = Cayenne.objectForPK(context, AuditableChildUuid.class, 1);
        Auditable1 a1 = Cayenne.objectForPK(context, Auditable1.class, 1);
        IdCoder refHandler = new IdCoder(domain.getEntityResolver());
        ObjectIdRelationshipHandler handler = new ObjectIdRelationshipHandler(refHandler);
        handler.relate(ac, a1);

        ac.setCharProperty1("xxxx");
        context.commitChanges();
        assertEquals(1, processor.size);
        Collection<Object> auditables = processor.audited.get(AuditableOperation.UPDATE);
View Full Code Here

Examples of org.apache.cayenne.lifecycle.relationship.ObjectIdRelationshipHandler.relate()

        Auditable1 auditedParent = context.newObject(Auditable1.class);
        AuditableChildUuid audited = context.newObject(AuditableChildUuid.class);

        IdCoder refHandler = new IdCoder(context.getEntityResolver());
        ObjectIdRelationshipHandler handler = new ObjectIdRelationshipHandler(refHandler);
        handler.relate(audited, auditedParent);
        context.commitChanges();

        AuditableFilter filter = new AuditableFilter(resolver, processor);
        filter.updateAuditChild(audited);
        filter.postSync();
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.