public class SpatialUtils
extends java.lang.Object
Provides convenience spatial operations used internally by the API components.
Constructor and Description |
---|
SpatialUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
anyInteract(oracle.spatial.geometry.JGeometry g1, oracle.spatial.geometry.JGeometry g2, java.lang.Boolean geodetic, java.lang.Double tolerance)
Performs an anyInteract test between two geometries
|
static void |
compute2DPolygonCentroid(double[] polygonOrdinates, double[] centroid) |
static oracle.spatial.geometry.JGeometry |
compute2DPolygonCentroid(double[] ordinates, int srid) |
static void |
createHexagonFromCircle(double cx, double cy, double radius, double[] hexOrds) |
static oracle.spatial.geometry.JGeometry |
createHexagonFromCircle(double cx, double cy, double radius, int srid) |
static SpatialOperationConfig |
createSpatialOperationConfig(org.apache.hadoop.mapred.JobConf conf)
Deprecated.
Use
SpatialOperationConfig .load() instead. Creates a SpatialOperationConfig out of the job configuration |
static void |
expandMbr(double[] mbr, double[] point) |
static java.lang.String |
geomToString(oracle.spatial.geometry.JGeometry geom) |
static void |
getCentroid(oracle.spatial.geometry.JGeometry geom, double[] centroid) |
static double[] |
getIntersectingMBR(double[] mbr1, double[] mbr2) |
static double[] |
getMBRWithTolerance(oracle.spatial.geometry.JGeometry geom, SpatialConfig spatialConfig) |
static void |
getPoint(double x, double y, double angle, double length, boolean degrees, double[] point) |
static double |
getPointDistance(double[] p1, double[] p2, int dim) |
static double |
getPointDistance(double p1X, double p1Y, double p2X, double p2Y) |
static void |
getSpanForIndex(oracle.spatial.geometry.JGeometry geom, double[][] span) |
static void |
getSpanForIndex(oracle.spatial.geometry.JGeometry geom, double[][] span, java.lang.Double tolerance) |
static void |
getSpanForIndex(oracle.spatial.geometry.JGeometry geom, double[][] span, SpatialConfig spatialConf, boolean addTolerance) |
static boolean |
isGeodeticSrid(java.lang.Integer srid)
Returns true if the current SRID is geodetic
|
static boolean |
isInside(oracle.spatial.geometry.JGeometry g1, oracle.spatial.geometry.JGeometry g2, java.lang.Boolean geodetic, java.lang.Double tolerance)
Performs an isInside test between two geometry
|
static boolean |
isValidMBR(double[] mbr) |
static boolean |
performFilter(oracle.spatial.geometry.JGeometry geom, SpatialOperationConfig spatialOpConf)
Performs the spatial operation described by the
SpatialOperationConfig parameter. |
static oracle.spatial.geometry.FastJGeometry |
toFastJGeometry(oracle.spatial.geometry.JGeometry geom, double tol, java.util.EnumSet<SpatialOperation> opSet) |
static oracle.spatial.geometry.FastJGeometry |
toFastJGeometry(oracle.spatial.geometry.JGeometry geom, double tol, SpatialOperation op) |
static oracle.spatial.geometry.JGeometry |
toFastJGeometrySafety(oracle.spatial.geometry.JGeometry geom, double tol, SpatialOperation op) |
static oracle.spatial.geometry.FastJGeometry.FastOp |
toFastOp(SpatialOperation op) |
static boolean |
withinDistance(oracle.spatial.geometry.JGeometry g1, oracle.spatial.geometry.JGeometry g2, double maxDistance, java.lang.Boolean geodetic, java.lang.Double tolerance) |
public static SpatialOperationConfig createSpatialOperationConfig(org.apache.hadoop.mapred.JobConf conf)
SpatialOperationConfig
.load() instead. Creates a SpatialOperationConfig
out of the job configurationconf
- the job configurationSpatialOperation
public static boolean performFilter(oracle.spatial.geometry.JGeometry geom, SpatialOperationConfig spatialOpConf) throws java.lang.Exception
SpatialOperationConfig
parameter.geom
- a JGeometry instance that will be used as operand in the spatal filterspatialOpConf
- a SpatialOperationConfig
which describes the operation to performjava.lang.Exception
public static boolean isInside(oracle.spatial.geometry.JGeometry g1, oracle.spatial.geometry.JGeometry g2, java.lang.Boolean geodetic, java.lang.Double tolerance) throws java.lang.Exception
g1
- the geometry which is tested to be within the otherg2
- the geometry which may contain the first geometrygeodetic
- whether the geometries are geodetic or nottolerance
- the tolerance usedjava.lang.Exception
public static boolean anyInteract(oracle.spatial.geometry.JGeometry g1, oracle.spatial.geometry.JGeometry g2, java.lang.Boolean geodetic, java.lang.Double tolerance) throws java.lang.Exception
g1
- a JGeometry instanceg2
- a JGeometry instancegeodetic
- whether the geometries are geodetic or nottolerance
- the tolerance usedjava.lang.Exception
public static boolean withinDistance(oracle.spatial.geometry.JGeometry g1, oracle.spatial.geometry.JGeometry g2, double maxDistance, java.lang.Boolean geodetic, java.lang.Double tolerance) throws java.lang.Exception
java.lang.Exception
public static java.lang.String geomToString(oracle.spatial.geometry.JGeometry geom)
public static double getPointDistance(double[] p1, double[] p2, int dim)
public static double getPointDistance(double p1X, double p1Y, double p2X, double p2Y)
public static void getCentroid(oracle.spatial.geometry.JGeometry geom, double[] centroid)
public static oracle.spatial.geometry.JGeometry createHexagonFromCircle(double cx, double cy, double radius, int srid)
public static void createHexagonFromCircle(double cx, double cy, double radius, double[] hexOrds)
public static void getPoint(double x, double y, double angle, double length, boolean degrees, double[] point)
public static double[] getMBRWithTolerance(oracle.spatial.geometry.JGeometry geom, SpatialConfig spatialConfig)
public static void getSpanForIndex(oracle.spatial.geometry.JGeometry geom, double[][] span)
public static void getSpanForIndex(oracle.spatial.geometry.JGeometry geom, double[][] span, SpatialConfig spatialConf, boolean addTolerance)
public static void getSpanForIndex(oracle.spatial.geometry.JGeometry geom, double[][] span, java.lang.Double tolerance)
public static void compute2DPolygonCentroid(double[] polygonOrdinates, double[] centroid)
public static oracle.spatial.geometry.JGeometry compute2DPolygonCentroid(double[] ordinates, int srid)
public static boolean isValidMBR(double[] mbr)
public static void expandMbr(double[] mbr, double[] point)
public static boolean isGeodeticSrid(java.lang.Integer srid)
public static double[] getIntersectingMBR(double[] mbr1, double[] mbr2)
public static oracle.spatial.geometry.FastJGeometry.FastOp toFastOp(SpatialOperation op)
public static oracle.spatial.geometry.FastJGeometry toFastJGeometry(oracle.spatial.geometry.JGeometry geom, double tol, SpatialOperation op) throws java.lang.Exception
java.lang.Exception
public static oracle.spatial.geometry.JGeometry toFastJGeometrySafety(oracle.spatial.geometry.JGeometry geom, double tol, SpatialOperation op)
public static oracle.spatial.geometry.FastJGeometry toFastJGeometry(oracle.spatial.geometry.JGeometry geom, double tol, java.util.EnumSet<SpatialOperation> opSet) throws java.lang.Exception
java.lang.Exception
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.