Examples of equalsTopo()


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

      Geometry read = (Geometry) features[0].getDefaultGeometry();
        assertNull(read);
     
      Geometry orig = (Geometry) features[1].getDefaultGeometry();
      read = (Geometry) features[1].getDefaultGeometry();
    assertTrue(orig.equalsTopo(read));
   
    // check the null geometry
    read = (Geometry) features[2].getDefaultGeometry();
    assertNull(read);
   
View Full Code Here

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

    assertNull(read);
   
    // make sure the third is ok as well
    orig = (Geometry) features[3].getDefaultGeometry();
      read = (Geometry) features[3].getDefaultGeometry();
    assertTrue(orig.equalsTopo(read));
   
    store.dispose();
  }
 
View Full Code Here

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

        Geometry g = new WKTReader().read("LINESTRING(-170 -40, 170, 40)");

        ProjectionHandler handler = ProjectionHandlerFinder.getHandler(utmEnvelope, WGS84, true);
        assertTrue(handler.requiresProcessing(g));
        Geometry preProcessed = handler.preProcess(g);
        assertTrue(!preProcessed.equalsTopo(g));
        assertTrue(handler.validAreaBounds.contains(preProcessed.getEnvelopeInternal()));
    }

    @Test
    public void testPolarStereographic() throws Exception {
View Full Code Here

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

        SimpleFeatureIterator fi = dataStore.getFeatureSource("COLA_MARKETS_CS").getFeatures().features();
        assertTrue(fi.hasNext());
        SimpleFeature sf = fi.next();
        assertNotNull(sf.getDefaultGeometry());
        Geometry expected = new WKTReader().read("POLYGON((6 4, 12 4, 12 12, 6 12, 6 4))");
        assertTrue(expected.equalsTopo((Geometry) sf.getDefaultGeometry()));
        fi.close();
    }
   
    public void testGeometryMetadataTable() throws Exception {
        testSetup.setupGeometryColumns(dataStore);
View Full Code Here

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

            WKTReader reader = new WKTReader();
            Geometry expectedGeometry;
            expectedGeometry = reader.read(strGeomExpected);
           
            Assert.assertTrue(expectedGeometry.equalsTopo(actualGeometry));

    }
   
}
View Full Code Here

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

    for (Iterator i = geometries.iterator(); i.hasNext();) {
      Geometry element = (Geometry) i.next();
      if (exact && element.equalsExact(g)) {
        return true;
      }
      if (!exact && element.equalsTopo(g)) {
        return true;
      }     
    }

    return false;
View Full Code Here

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

        assertEquals(before.getCoordinateN(2), coordinates[2]);
        assertEquals(before.getCoordinateN(3), coordinates[3]);

        LinearRing after = JTSUtilities.reverseRing(before);

        assertTrue( after.equalsTopo(before.reverse()) );

        assertEquals(after.getCoordinateN(0), coordinates[3]);
        assertEquals(after.getCoordinateN(1), coordinates[2]);
        assertEquals(after.getCoordinateN(2), coordinates[1]);
        assertEquals(after.getCoordinateN(3), coordinates[0]);
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.