Package org.openjump.core.apitools
Class SelectionTools
- java.lang.Object
-
- org.openjump.core.apitools.ToolToMakeYourLifeEasier
-
- org.openjump.core.apitools.SelectionTools
-
public class SelectionTools extends ToolToMakeYourLifeEasier
Class to easily handle selections and selection tools. Also has methods to find features by given geometries.- Author:
- Ole Rahn FH Osnabrück - University of Applied Sciences Osnabrück Project PIROL 2005 Daten- und Wissensmanagement
-
-
Field Summary
Fields Modifier and Type Field Description protected PlugInContext
context
-
Constructor Summary
Constructors Constructor Description SelectionTools(PlugInContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List
getFeaturesInFence()
static Feature[]
getFeaturesInFenceInLayer(Feature[] featArray, org.locationtech.jts.geom.Geometry fenceGeometry)
Get a list of features (a sub list of the given array) that are included by the given fence geometry.static Feature[]
getFeaturesInFenceInLayer(Layer layer, org.locationtech.jts.geom.Geometry fenceGeometry)
Get a list of those features from the given layer that are included by the given fence geometry.static List
getFeaturesInFenceInLayerAsList(Layer layer, org.locationtech.jts.geom.Geometry fenceGeometry)
Get a list of those features from the given layer that are included by the given fence geometry.List
getFeaturesInGeometry(org.locationtech.jts.geom.Geometry fenceGeometry)
static Feature[]
getFeaturesOnTheSameSpot(Feature[] featArray, org.locationtech.jts.geom.Geometry fenceGeometry, boolean bothWays)
Get a list of features (a sub list of the given array) that are included by the given fence geometry.static Feature[]
getFeaturesOnTheSameSpot(Layer layer, org.locationtech.jts.geom.Geometry fenceGeometry, boolean bothWays)
Get a list of those features from the given layer that are included by the given fence geometry.org.locationtech.jts.geom.Geometry
getFenceGeometry()
static org.locationtech.jts.geom.Geometry
getFenceGeometry(PlugInContext context)
List<Feature>
getSelectedFeatures()
static List<Feature>
getSelectedFeatures(PlugInContext context)
static List<Feature>
getSelectedFeaturesFromLayer(PlugInContext context, Layer layer)
void
selectFeatures(List features)
create a selection out of the given features that is visible in the Jump mapstatic void
selectFeatures(List features, PlugInContext context)
static void
selectLayer(PlugInContext context, Layer layer)
-
-
-
Field Detail
-
context
protected PlugInContext context
-
-
Constructor Detail
-
SelectionTools
public SelectionTools(PlugInContext context)
-
-
Method Detail
-
selectFeatures
public void selectFeatures(List features)
create a selection out of the given features that is visible in the Jump map- Parameters:
features
- features to be selected
-
selectLayer
public static void selectLayer(PlugInContext context, Layer layer)
-
selectFeatures
public static void selectFeatures(List features, PlugInContext context)
-
getSelectedFeaturesFromLayer
public static List<Feature> getSelectedFeaturesFromLayer(PlugInContext context, Layer layer)
-
getSelectedFeatures
public static List<Feature> getSelectedFeatures(PlugInContext context)
-
getFenceGeometry
public static org.locationtech.jts.geom.Geometry getFenceGeometry(PlugInContext context)
- Parameters:
context
- current PlugIn context- Returns:
- the geometry of the current fence, or null if there is currently no fence
-
getFenceGeometry
public org.locationtech.jts.geom.Geometry getFenceGeometry()
- Returns:
- the geometry of the current fence, or null if there is currently no fence
-
getFeaturesInFence
public List getFeaturesInFence()
-
getFeaturesInGeometry
public List getFeaturesInGeometry(org.locationtech.jts.geom.Geometry fenceGeometry)
-
getFeaturesInFenceInLayer
public static Feature[] getFeaturesInFenceInLayer(Layer layer, org.locationtech.jts.geom.Geometry fenceGeometry)
Get a list of those features from the given layer that are included by the given fence geometry.- Parameters:
layer
- - Layer to search infenceGeometry
- - Geometry to search in
-
getFeaturesInFenceInLayerAsList
public static List getFeaturesInFenceInLayerAsList(Layer layer, org.locationtech.jts.geom.Geometry fenceGeometry)
Get a list of those features from the given layer that are included by the given fence geometry.- Parameters:
layer
- - Layer to search infenceGeometry
- - Geometry to search in
-
getFeaturesInFenceInLayer
public static Feature[] getFeaturesInFenceInLayer(Feature[] featArray, org.locationtech.jts.geom.Geometry fenceGeometry)
Get a list of features (a sub list of the given array) that are included by the given fence geometry.- Parameters:
featArray
- - Array of features to search infenceGeometry
- - Geometry to search in
-
getFeaturesOnTheSameSpot
public static Feature[] getFeaturesOnTheSameSpot(Layer layer, org.locationtech.jts.geom.Geometry fenceGeometry, boolean bothWays)
Get a list of those features from the given layer that are included by the given fence geometry.- Parameters:
layer
- - Layer to search infenceGeometry
- - Geometry to search inbothWays
- - sets if it's also a hit if the feature's geometry includes the fence geometry
-
getFeaturesOnTheSameSpot
public static Feature[] getFeaturesOnTheSameSpot(Feature[] featArray, org.locationtech.jts.geom.Geometry fenceGeometry, boolean bothWays)
Get a list of features (a sub list of the given array) that are included by the given fence geometry.- Parameters:
featArray
- - Array of features to search infenceGeometry
- - Geometry to search inbothWays
- - sets if it's also a hit if the feature's geometry includes the fence geometry
-
-