Java Code Examples for org.locationtech.jts.geom.Geometry#equals()

The following examples show how to use org.locationtech.jts.geom.Geometry#equals() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Shape.java    From MeteoInfo with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * If this shape equals another one
 * @param other Other shape
 * @return Equals or not
 */
public boolean equals(Shape other){
    Geometry g1 = this.toGeometry();
    Geometry g2 = other.toGeometry();
    return g1.equals(g2);
}
 
Example 2
Source File: GeomEquals.java    From geowave with Apache License 2.0 4 votes vote down vote up
@Override
public boolean apply(final Geometry geom1, final Geometry geom2) {
  return geom1.equals(geom2);
}