public class LayerTools extends ToolToMakeYourLifeEasier
Modifier and Type | Field and Description |
---|---|
protected PlugInContext |
context |
Constructor and Description |
---|
LayerTools(PlugInContext context) |
Modifier and Type | Method and Description |
---|---|
static Layer |
addAndSelectStandardResultLayer(java.lang.String title,
FeatureCollection featCollection,
java.awt.Color color,
PlugInContext context,
FeatureCollectionRole role) |
static Layer |
addAndSelectStandardResultLayer(java.lang.String title,
FeatureCollection featCollection,
PlugInContext context,
FeatureCollectionRole role) |
static Layer |
addStandardResultLayer(java.lang.String title,
FeatureCollection featCollection,
java.awt.Color color,
PlugInContext context,
boolean select,
FeatureCollectionRole role) |
static Layer |
addStandardResultLayer(java.lang.String title,
FeatureCollection featCollection,
java.awt.Color color,
PlugInContext context,
FeatureCollectionRole role) |
Layer |
addStandardResultLayer(java.lang.String title,
FeatureCollection featCollection,
FeatureCollectionRole role) |
static Layer |
addStandardResultLayer(java.lang.String title,
FeatureCollection featCollection,
PlugInContext context,
FeatureCollectionRole role) |
java.util.List |
getFeaturesInFence() |
Feature[] |
getFeaturesInFenceInLayer(Feature[] featArray,
com.vividsolutions.jts.geom.Geometry fenceGeometry) |
Feature[] |
getFeaturesInFenceInLayer(Layer layer,
com.vividsolutions.jts.geom.Geometry fenceGeometry) |
com.vividsolutions.jts.geom.Geometry |
getFenceGeometry() |
java.util.Map |
getLayer2FeatureMap(java.util.List features) |
static java.util.Map |
getLayer2FeatureMap(java.util.List features,
PlugInContext context) |
int |
getNumSelectedLayers() |
static int |
getNumSelectedLayers(PlugInContext context) |
Category |
getResultCategory() |
static Category |
getResultCategory(PlugInContext context) |
java.util.List |
getSelectedFeatures() |
static Layer |
getSelectedLayer(PlugInContext context)
get one Layer that is selected
|
static Layerable |
getSelectedLayerable(PlugInContext context,
java.lang.Class layerableClass)
get one Layer that is selected
|
static Layerable |
getSelectedLayerable(WorkbenchContext context,
java.lang.Class layerableClass)
get one Layer that is selected
|
Layer[] |
getSelectedLayers() |
static Layer[] |
getSelectedLayers(PlugInContext context,
int num)
Get a given number of selected Layers.
|
static java.lang.String |
getUniqueLayerName(PlugInContext context,
java.lang.String name)
returns a layername, that is not yet used in the layername panel
|
static Layer |
putGeometryArrayIntoMap(com.vividsolutions.jts.geom.Geometry[] geometryArray,
PlugInContext context) |
protected PlugInContext context
public LayerTools(PlugInContext context)
public Layer[] getSelectedLayers()
public java.util.List getSelectedFeatures()
public com.vividsolutions.jts.geom.Geometry getFenceGeometry()
public java.util.List getFeaturesInFence()
public Feature[] getFeaturesInFenceInLayer(Layer layer, com.vividsolutions.jts.geom.Geometry fenceGeometry)
public Feature[] getFeaturesInFenceInLayer(Feature[] featArray, com.vividsolutions.jts.geom.Geometry fenceGeometry)
public int getNumSelectedLayers()
public static int getNumSelectedLayers(PlugInContext context)
public static Layer addStandardResultLayer(java.lang.String title, FeatureCollection featCollection, PlugInContext context, FeatureCollectionRole role)
public static Layer addAndSelectStandardResultLayer(java.lang.String title, FeatureCollection featCollection, java.awt.Color color, PlugInContext context, FeatureCollectionRole role)
public static Layer addAndSelectStandardResultLayer(java.lang.String title, FeatureCollection featCollection, PlugInContext context, FeatureCollectionRole role)
public static Layer addStandardResultLayer(java.lang.String title, FeatureCollection featCollection, java.awt.Color color, PlugInContext context, FeatureCollectionRole role)
public static Layer addStandardResultLayer(java.lang.String title, FeatureCollection featCollection, java.awt.Color color, PlugInContext context, boolean select, FeatureCollectionRole role)
public Layer addStandardResultLayer(java.lang.String title, FeatureCollection featCollection, FeatureCollectionRole role)
public java.util.Map getLayer2FeatureMap(java.util.List features)
public static final Layer putGeometryArrayIntoMap(com.vividsolutions.jts.geom.Geometry[] geometryArray, PlugInContext context)
public static java.util.Map getLayer2FeatureMap(java.util.List features, PlugInContext context)
public Category getResultCategory()
public static Category getResultCategory(PlugInContext context)
public static Layer[] getSelectedLayers(PlugInContext context, int num)
context
- the current PlugInContextnum
- max. number of layers to return, -1 returns all selected layerspublic static Layer getSelectedLayer(PlugInContext context)
context
- the current PlugInContextpublic static Layerable getSelectedLayerable(PlugInContext context, java.lang.Class layerableClass)
context
- the current PlugInContextpublic static Layerable getSelectedLayerable(WorkbenchContext context, java.lang.Class layerableClass)
context
- the current WorkbenchContextpublic static java.lang.String getUniqueLayerName(PlugInContext context, java.lang.String name)