sample_points
Created: 2014-03-19 16:53:52
Last updated: 2015-05-11 22:15:23
Randomly samples a specified number of absence and/or presence points in a given environment.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Alan R Williams & Renato De Giovanni |
Titles (1)
Descriptions (1)
Randomly sample a specified number of absence and/or presence points in a given environment. |
Dependencies (0)
Inputs (7)
Name |
Description |
environmentally_unique |
Filter environmentally unique points. Optional. Default value: "no".
|
spatially_unique |
Filter spatially unique points. Optional. Default value: "no".
|
layers |
Newline separated list of layers defining the environment for point sampling.
|
mask_id |
Mask id used for sampling points. Optional. Default value: first layer.
|
num_points |
Number of points to be sampled.
|
species_label |
Species name to be returned for all points. Optional. Default value: "undefined".
|
proportion_of_absences |
Proportion of absence points to be sampled (value between 0 and 1). Optional. Default value: 1.
|
Processors (2)
Name |
Type |
Description |
make_xml |
beanshell |
Scriptif ((num_points == void) || (num_points == null)) {
throw new RuntimeException("The num_points parameter must be specified for sampling points");
}
if ((layers == void) || (layers == null)) {
throw new RuntimeException("The layers parameter must be specified for sampling points");
}
if ((species_label == void) || (species_label == null)) {
species_label = "undefined";
}
if ((srs == void) || (srs == null)) {
srs = "GEOGCS[\"WGS84\", DATUM[\"WGS84\", SPHEROID[\"WGS84\", 6378137.0, 298.257223563]], PRIMEM[\"Greenwich\", 0.0], UNIT[\"degree\", 0.017453292519943295], AXIS[\"Longitude\",EAST], AXIS[\"Latitude\",NORTH]]";
}
if ((proportion_of_absences == void) || (proportion_of_absences == null)) {
proportion_of_absences = "1";
}
if ((spatially_unique == void) || (spatially_unique == null)) {
spatially_unique = "no";
}
if ((environmentally_unique == void) || (environmentally_unique == null)) {
environmentally_unique = "no";
}
xml = "\n"
+"\n"
+"\n"
+"\n";
int i = 0;
String[] s_layers = layers.split("\n");
String first_layer = "";
for ( i = 0; i < s_layers.length; ++i ) {
if ( s_layers[i].length() > 0 ) {
if (first_layer.length() == 0) {
first_layer = s_layers[i];
}
xml += "\n"
+"\n";
if (spatially_unique.equals("yes") || environmentally_unique.equals("yes")) {
xml += "\n";
if (environmentally_unique.equals("yes")) {
xml += "\n";
}
if (spatially_unique.equals("yes")) {
xml += "\n";
}
xml += "\n";
}
xml += "\n"
+"\n"
+"\n"; |
call_service |
workflow |
This part is responsible for calling the service and fetching results. |
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
make_xml |
|
environmentally_unique
mask_id
layers
spatially_unique
proportion_of_absences
num_points
species_label
|
xml
|
checkProgress |
|
input_progress
|
output_progress
|
Outputs (4)
Name |
Description |
log |
Sample points log.
|
progress |
Sample points progress. Possible values are: 100 (finished), -2 (aborted) or -3 (cancelled).
|
presence_points_xml |
XML with sampled presence points.
|
absence_points_xml |
XML with sampled absence points.
|
Datalinks (12)
Source |
Sink |
mask_id |
make_xml:mask_id |
layers |
make_xml:layers |
species_label |
make_xml:species_label |
num_points |
make_xml:num_points |
spatially_unique |
make_xml:spatially_unique |
environmentally_unique |
make_xml:environmentally_unique |
proportion_of_absences |
make_xml:proportion_of_absences |
make_xml:xml |
call_service:samplePoints_configuration |
call_service:output_log |
log |
call_service:output_progress |
progress |
call_service:presence_points_xml |
presence_points_xml |
call_service:absence_points_xml |
absence_points_xml |
Uploader
Component Validity
Loading
License
All versions of this Workflow are
licensed under:
Version 6
(of 11)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (0)
None
Featured In Packs (1)
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(7)
Only the first 2 workflows that use similar services are shown. View all workflows that use these services.
Uploader
Project
get_available_algorithms
(3)
Retrieves all available algorithms from the openModeller web service, returning an XML.
Created: 2013-12-06
| Last updated: 2014-11-04
Uploader
Project
evaluate_model
(9)
Evaluates a model, returning model values for a given set of points and layers.
Created: 2013-12-10
| Last updated: 2014-12-04
Comments (0)
No comments yet
Log in to make a comment