Java Code Examples for com.esri.core.geometry.ogc.OGCGeometry#Equals

The following examples show how to use com.esri.core.geometry.ogc.OGCGeometry#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 Project: presto   File: GeoFunctions.java    License: Apache License 2.0 5 votes vote down vote up
@SqlNullable
@Description("Returns TRUE if the given geometries represent the same geometry")
@ScalarFunction("ST_Equals")
@SqlType(BOOLEAN)
public static Boolean stEquals(@SqlType(GEOMETRY_TYPE_NAME) Slice left, @SqlType(GEOMETRY_TYPE_NAME) Slice right)
{
    OGCGeometry leftGeometry = deserialize(left);
    OGCGeometry rightGeometry = deserialize(right);
    verifySameSpatialReference(leftGeometry, rightGeometry);
    return leftGeometry.Equals(rightGeometry);
}