For IntelliJ IDEA,

Android Studio or Eclipse

- Common ways to obtain Geometry

private void myMethod () {Geometry g =

- GeometryCollection gc;gc.getGeometryN(n)
- SimpleFeature feature;(Geometry) feature.getDefaultGeometry()
- String wellKnownText;new WKTReader().read(wellKnownText)
- Smart code suggestions by Codota
}

/** * Tests whether this geometry is * topologically equal to the argument geometry. * <p> * This method is included for backward compatibility reasons. * It has been superseded by the {@link #equalsTopo(Geometry)} method, * which has been named to clearly denote its functionality. * <p> * This method should NOT be confused with the method * {@link #equals(Object)}, which implements * an exact equality comparison. * *@param g the <code>Geometry</code> with which to compare this <code>Geometry</code> *@return true if the two <code>Geometry</code>s are topologically equal * *@see #equalsTopo(Geometry) */ public boolean equals(Geometry g) { return equalsTopo(g); }

public boolean equals(Geometry g) { return geometry.equalsTopo(g); }

/** * Tests whether this geometry is * topologically equal to the argument geometry. * <p> * This method is included for backward compatibility reasons. * It has been superseded by the {@link #equalsTopo(Geometry)} method, * which has been named to clearly denote its functionality. * <p> * This method should NOT be confused with the method * {@link #equals(Object)}, which implements * an exact equality comparison. * *@param g the <code>Geometry</code> with which to compare this <code>Geometry</code> *@return true if the two <code>Geometry</code>s are topologically equal * *@see #equalsTopo(Geometry) */ public boolean equals(Geometry g) { if (g == null) return false; return equalsTopo(g); }

public static Boolean equals(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { return getGeometry(geom1).equalsTopo(getGeometry(geom2)); }

public static Boolean equals(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { return getGeometry(geom1).equalsTopo(getGeometry(geom2)); }

public static Boolean equals(GeometryType geom1, GeometryType geom2) throws FunctionExecutionException { return getGeometry(geom1).equalsTopo(getGeometry(geom2)); }

if (!jtsPolygon.convexHull().equalsTopo(jtsPolygon)) { errHandler.addError(ErrorSeverity.ERROR, ErrorMessage.format( ErrorMessageKeys.QUAD_NOT_CONVEX, jtsPolygon.toText()),