Search in sources :

Example 1 with SpatialReference

use of com.esri.core.geometry.SpatialReference in project calcite by apache.

the class GeoFunctions method ST_Union.

/**
 * Computes the union of the geometries in {@code geomCollection}.
 */
@SemiStrict
public static Geom ST_Union(Geom geomCollection) {
    SpatialReference sr = geomCollection.sr();
    final Geometry g = GeometryEngine.union(new Geometry[] { geomCollection.g() }, sr);
    return bind(g, sr);
}
Also used : Geometry(com.esri.core.geometry.Geometry) MapGeometry(com.esri.core.geometry.MapGeometry) SpatialReference(com.esri.core.geometry.SpatialReference) SemiStrict(org.apache.calcite.linq4j.function.SemiStrict)

Example 2 with SpatialReference

use of com.esri.core.geometry.SpatialReference in project calcite by apache.

the class GeoFunctions method ST_Intersects.

/**
 * Returns whether {@code geom1} intersects {@code geom2}.
 */
public static boolean ST_Intersects(Geom geom1, Geom geom2) {
    final Geometry g1 = geom1.g();
    final Geometry g2 = geom2.g();
    final SpatialReference sr = geom1.sr();
    return intersects(g1, g2, sr);
}
Also used : Geometry(com.esri.core.geometry.Geometry) MapGeometry(com.esri.core.geometry.MapGeometry) SpatialReference(com.esri.core.geometry.SpatialReference)

Aggregations

Geometry (com.esri.core.geometry.Geometry)2 MapGeometry (com.esri.core.geometry.MapGeometry)2 SpatialReference (com.esri.core.geometry.SpatialReference)2 SemiStrict (org.apache.calcite.linq4j.function.SemiStrict)1