public class GeoSpatialService extends java.lang.Object implements SpatialService
| Modifier | Constructor and Description |
|---|---|
protected |
GeoSpatialService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.util.Collection<? extends Spatial> containers,
Spatial contained)
Check if any of the spatial objects in the collection contains the specified object.
|
boolean |
contains(Spatial container,
Spatial contained)
Check if the given spatial object contains another spatial object
|
<T extends Spatial> |
getContained(Spatial container,
java.util.Collection<T> all)
Find objects contained in the specified spatial object.
|
<T extends Spatial> |
getContainers(Spatial contained,
java.util.Collection<T> all)
Find objects containing the specified spatial object.
|
CoordinateReferenceSystemFactory |
getCoordinateReferenceSystemFactory()
Get a coordinate reference system factory that is used to get defined coordinate reference system or to create a new one
|
double |
getDistance(Spatial from,
Spatial to,
LengthUnit units)
Compute distance between two spatial objects.
|
GeometryFactory |
getGeometryFactory()
Get a geometry factory that is used to create new geometries
|
<T extends Spatial> |
getNearestNeighbor(Spatial source,
java.util.Collection<T> all)
Find the nearest neighbor of the given spatial object among a specified collection of spatial objects
|
static GeoSpatialService |
getService() |
<T extends Spatial> |
getWithinDistance(Spatial source,
java.util.Collection<T> all,
double maxDistance,
LengthUnit units)
Find objects located within the specified distance from the source object
|
boolean |
intersects(Spatial object1,
Spatial object2)
Check if two spatial objects intersect
|
<T extends Spatial> |
sortByProximity(Spatial source,
java.util.Collection<T> all)
Sort a collection of spatial objects based on their proximity to the given source object
|
public static GeoSpatialService getService()
public double getDistance(Spatial from, Spatial to, LengthUnit units)
SpatialServicegetDistance in interface SpatialServicefrom - source objectto - target objectunits - specifies unit for measuring distance.public boolean contains(Spatial container, Spatial contained)
SpatialServicecontains in interface SpatialServicepublic boolean contains(java.util.Collection<? extends Spatial> containers, Spatial contained)
SpatialServicecontains in interface SpatialServicepublic boolean intersects(Spatial object1, Spatial object2)
SpatialServiceintersects in interface SpatialServicepublic GeometryFactory getGeometryFactory()
SpatialServicegetGeometryFactory in interface SpatialServicepublic <T extends Spatial> T getNearestNeighbor(Spatial source, java.util.Collection<T> all)
SpatialServicegetNearestNeighbor in interface SpatialServicesource - object for which the nearest neighbor to be foundall - - a collection of spatial objects to look for the nearest neighborpublic <T extends Spatial> java.util.List<T> getWithinDistance(Spatial source, java.util.Collection<T> all, double maxDistance, LengthUnit units)
SpatialServicegetWithinDistance in interface SpatialServiceall - a collection of spatial objects to filter based on the proximity to the sourcemaxDistance - - maximal distance at which returned object must be to the sourceunits - - distance unitspublic <T extends Spatial> java.util.List<T> sortByProximity(Spatial source, java.util.Collection<T> all)
SpatialServicesortByProximity in interface SpatialServicesource - object that should be used to measure distance to from any object of collectionall - spatial objects to sortpublic <T extends Spatial> java.util.Collection<T> getContained(Spatial container, java.util.Collection<T> all)
SpatialServicegetContained in interface SpatialServicecontainer - the containing objectall - possible contained objects.public <T extends Spatial> java.util.Collection<T> getContainers(Spatial contained, java.util.Collection<T> all)
SpatialServicegetContainers in interface SpatialServicecontained - a spatial object which containers should be looked upall - possible containing objectspublic CoordinateReferenceSystemFactory getCoordinateReferenceSystemFactory()
SpatialServicegetCoordinateReferenceSystemFactory in interface SpatialService© Copyright IBM 2017