Examples of equalsExact()


Examples of com.vividsolutions.jts.geom.LinearRing.equalsExact()

       
        Decimator d = new Decimator(-1, -1);
        d.decimate(g);
        g.geometryChanged();
        assertTrue(g.isValid());
        assertTrue(original.equalsExact(g));
    }
   
    @Test
    public void testDistance() throws Exception {
        LineString ls = gf.createLineString(csf.create(new double[] {0,0,1,1,2,2,3,3,4,4,5,5}));
View Full Code Here

Examples of com.vividsolutions.jts.geom.MultiLineString.equalsExact()

   
    @Test
    public void testInsideOut() throws Exception {
        LineString ls = (LineString) wkt.read("LINESTRING(-2 8, 12 8, 12 2, -2 2)");
        MultiLineString clipped = (MultiLineString) clipper.clip(ls, false);
        assertTrue(clipped.equalsExact(wkt.read("MULTILINESTRING((0 8, 10 8), (10 2, 0 2))")));
        showResult("Touch border", ls, clipped);
    }
   
    @Test
    public void testFullyOutsideCircle() throws Exception {
View Full Code Here

Examples of com.vividsolutions.jts.geom.MultiPoint.equalsExact()

        MultiPoint mpo = (MultiPoint) original.getAttribute("pointProperty");
        MultiPoint mpm = mpo.getFactory().createMultiPoint(new Coordinate[] {new Coordinate(10, 12)});
        store.modifyFeatures(original.getFeatureType().getDescriptor("pointProperty"), mpm,
                fidFilter);
        modified = store.getFeatures(fidFilter).features().next();
        assertTrue(mpm.equalsExact((Geometry) modified.getAttribute("pointProperty")));
    }

    /**
     * This test is made with mock objects because the property data store does
     * not generate fids in the <type>.<id> form
View Full Code Here

Examples of com.vividsolutions.jts.geom.MultiPoint.equalsExact()

        MultiPoint mpo = (MultiPoint) original.getAttribute("pointProperty");
        MultiPoint mpm = mpo.getFactory().createMultiPoint(new Coordinate[] {new Coordinate(10, 12)});
        store.modifyFeatures(original.getFeatureType().getDescriptor("pointProperty"), mpm,
                fidFilter);
        modified = store.getFeatures(fidFilter).features().next();
        assertTrue(mpm.equalsExact((Geometry) modified.getAttribute("pointProperty")));
    }

    /**
     * This test is made with mock objects because the property data store does
     * not generate fids in the <type>.<id> form
View Full Code Here

Examples of com.vividsolutions.jts.geom.MultiPoint.equalsExact()

        MultiPoint mpo = (MultiPoint) original.getAttribute("pointProperty");
        MultiPoint mpm = mpo.getFactory().createMultiPoint(new Coordinate[] {new Coordinate(10, 12)});
        store.modifyFeatures(original.getFeatureType().getDescriptor("pointProperty"), mpm,
                fidFilter);
        modified = store.getFeatures(fidFilter).features().next();
        assertTrue(mpm.equalsExact((Geometry) modified.getAttribute("pointProperty")));
    }

    /**
     * This test is made with mock objects because the property data store does
     * not generate fids in the <type>.<id> form
View Full Code Here

Examples of com.vividsolutions.jts.geom.MultiPolygon.equalsExact()

    LinearRing shell = factory.createLinearRing(new Coordinate[] { new Coordinate(0, 0), new Coordinate(1, 0),
        new Coordinate(1, 1), new Coordinate(0, 1), new Coordinate(0, 0), });
    Polygon p = factory.createPolygon(shell, null);
    MultiPolygon expected =factory.createMultiPolygon(new Polygon[]{p});
    Geometry g = layer.getFeatureModel().getGeometry(bean);
    Assert.assertTrue(expected.equalsExact(g, 0.00001));
  }

  @Test
  public void simpleFilter() throws Exception {
    Filter filter = filterService.createCompareFilter("stringAttr", "=", "bean2");
View Full Code Here

Examples of com.vividsolutions.jts.geom.Point.equalsExact()

                    Geometry gt2 = (Geometry) tmp2.getDefaultGeometry();

                    if (gt2 instanceof Point) {
                        Point pt = (Point) gt2;

                        if (pt.equalsExact(str) || pt.equalsExact(end)) {
                            return true;
                        }
                    }
                }
            }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Point.equalsExact()

                    Geometry gt2 = (Geometry) tmp2.getDefaultGeometry();

                    if (gt2 instanceof Point) {
                        Point pt = (Point) gt2;

                        if (pt.equalsExact(str) || pt.equalsExact(end)) {
                            return true;
                        }
                    }
                }
            }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Point.equalsExact()

        try {
            assertTrue(i.hasNext());
   
            while (i.hasNext()) {
                SimpleFeature feature = (SimpleFeature) i.next();
                assertTrue(point.equalsExact((Geometry) feature.getAttribute(aname("geometry"))));
            }
        }
        finally {
            i.close();
        }
View Full Code Here

Examples of com.vividsolutions.jts.geom.Point.equalsExact()

        try {
            assertTrue(i.hasNext());
   
            while (i.hasNext()) {
                SimpleFeature feature = (SimpleFeature) i.next();
                assertTrue(point.equalsExact((Geometry) feature.getAttribute(aname("geometry"))));
            }
        }
        finally {
            i.close();
        }
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.