Class LayerTools
java.lang.Object
org.openjump.core.apitools.ToolToMakeYourLifeEasier
org.openjump.core.apitools.LayerTools
Class for more convenient use of Layer objects. Offers methods e.g. to get features that reside within
a given geometry or to easily add a result layer to the map.
- Author:
- Ole Rahn FH Osnabrück - University of Applied Sciences Osnabrück Project PIROL 2005 Daten- und Wissensmanagement [sstein] - 22.Feb.2009 - modified to work in OpenJUMP
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LayeraddAndSelectStandardResultLayer(String title, FeatureCollection featCollection, PlugInContext context, FeatureCollectionRole role) static LayeraddAndSelectStandardResultLayer(String title, FeatureCollection featCollection, Color color, PlugInContext context, FeatureCollectionRole role) static LayeraddStandardResultLayer(String title, FeatureCollection featCollection, PlugInContext context, FeatureCollectionRole role) static LayeraddStandardResultLayer(String title, FeatureCollection featCollection, Color color, PlugInContext context, boolean select, FeatureCollectionRole role) static LayeraddStandardResultLayer(String title, FeatureCollection featCollection, Color color, PlugInContext context, FeatureCollectionRole role) addStandardResultLayer(String title, FeatureCollection featCollection, FeatureCollectionRole role) Feature[]getFeaturesInFenceInLayer(Feature[] featArray, org.locationtech.jts.geom.Geometry fenceGeometry) Feature[]getFeaturesInFenceInLayer(Layer layer, org.locationtech.jts.geom.Geometry fenceGeometry) org.locationtech.jts.geom.GeometrygetLayer2FeatureMap(List features) getLayer2FeatureMap(List<Feature> features, PlugInContext context) intstatic intgetNumSelectedLayers(PlugInContext context) static CategorygetResultCategory(PlugInContext context) static LayergetSelectedLayer(PlugInContext context) get one Layer that is selectedstatic LayerablegetSelectedLayerable(PlugInContext context, Class layerableClass) get one Layer that is selectedstatic LayerablegetSelectedLayerable(WorkbenchContext context, Class layerableClass) get one Layer that is selectedLayer[]static Layer[]getSelectedLayers(PlugInContext context, int num) Get a given number of selected Layers.static StringgetUniqueLayerName(PlugInContext context, String name) returns a layername, that is not yet used in the layername panelstatic LayerputGeometryArrayIntoMap(org.locationtech.jts.geom.Geometry[] geometryArray, PlugInContext context)
-
Field Details
-
context
-
-
Constructor Details
-
LayerTools
-
-
Method Details
-
getSelectedLayers
-
getSelectedFeatures
-
getFenceGeometry
public org.locationtech.jts.geom.Geometry getFenceGeometry() -
getFeaturesInFence
-
getFeaturesInFenceInLayer
-
getFeaturesInFenceInLayer
-
getNumSelectedLayers
public int getNumSelectedLayers() -
getNumSelectedLayers
-
addStandardResultLayer
public static Layer addStandardResultLayer(String title, FeatureCollection featCollection, PlugInContext context, FeatureCollectionRole role) -
addAndSelectStandardResultLayer
public static Layer addAndSelectStandardResultLayer(String title, FeatureCollection featCollection, Color color, PlugInContext context, FeatureCollectionRole role) -
addAndSelectStandardResultLayer
public static Layer addAndSelectStandardResultLayer(String title, FeatureCollection featCollection, PlugInContext context, FeatureCollectionRole role) -
addStandardResultLayer
public static Layer addStandardResultLayer(String title, FeatureCollection featCollection, Color color, PlugInContext context, FeatureCollectionRole role) -
addStandardResultLayer
public static Layer addStandardResultLayer(String title, FeatureCollection featCollection, Color color, PlugInContext context, boolean select, FeatureCollectionRole role) -
addStandardResultLayer
public Layer addStandardResultLayer(String title, FeatureCollection featCollection, FeatureCollectionRole role) -
getLayer2FeatureMap
-
putGeometryArrayIntoMap
public static Layer putGeometryArrayIntoMap(org.locationtech.jts.geom.Geometry[] geometryArray, PlugInContext context) -
getLayer2FeatureMap
-
getResultCategory
-
getResultCategory
-
getSelectedLayers
Get a given number of selected Layers.- Parameters:
context- the current PlugInContextnum- max. number of layers to return, -1 returns all selected layers- Returns:
- a given number of selected Layers, null if no Layers are selected
-
getSelectedLayer
get one Layer that is selected- Parameters:
context- the current PlugInContext- Returns:
- one selected Layer, null if no Layers are selected
-
getSelectedLayerable
get one Layer that is selected- Parameters:
context- the current PlugInContext- Returns:
- one selected Layer, null if no Layers are selected
-
getSelectedLayerable
get one Layer that is selected- Parameters:
context- the current WorkbenchContext- Returns:
- one selected Layer, null if no Layers are selected
-
getUniqueLayerName
returns a layername, that is not yet used in the layername panel
-