git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@92561 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ad8ebdf06f
commit
56c76241db
|
@ -0,0 +1,93 @@
|
|||
package org.gcube.dataanalysis.geo.test.infra;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.contentmanagement.lexicalmatcher.utils.AnalysisLogger;
|
||||
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
||||
import org.gcube.dataanalysis.ecoengine.datatypes.StatisticalType;
|
||||
import org.gcube.dataanalysis.ecoengine.interfaces.ComputationalAgent;
|
||||
import org.gcube.dataanalysis.ecoengine.processing.factories.TransducerersFactory;
|
||||
import org.gcube.dataanalysis.ecoengine.test.regression.Regressor;
|
||||
import org.gcube.dataanalysis.geo.connectors.table.TableMatrixRepresentation;
|
||||
|
||||
public class TestExtraction {
|
||||
|
||||
static AlgorithmConfiguration[] configs = { testXYExtractionNetCDF(),testXYExtractionAquaMaps(),testXYExtractionTable()};
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
System.out.println("TEST 1");
|
||||
|
||||
for (int i = 0; i < configs.length; i++) {
|
||||
AnalysisLogger.getLogger().debug("Executing: "+configs[i].getAgent());
|
||||
List<ComputationalAgent> trans = null;
|
||||
trans = TransducerersFactory.getTransducerers(configs[i]);
|
||||
trans.get(0).init();
|
||||
Regressor.process(trans.get(0));
|
||||
StatisticalType st = trans.get(0).getOutput();
|
||||
AnalysisLogger.getLogger().debug("ST:" + st);
|
||||
trans = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static AlgorithmConfiguration testXYExtractionNetCDF() {
|
||||
|
||||
AlgorithmConfiguration config = new AlgorithmConfiguration();
|
||||
|
||||
config.setAgent("XYEXTRACTOR");
|
||||
config.setConfigPath("./cfg/");
|
||||
config.setPersistencePath("./");
|
||||
config.setParam("DatabaseUserName","gcube");
|
||||
config.setParam("DatabasePassword","d4science2");
|
||||
config.setParam("DatabaseURL","jdbc:postgresql://localhost/testdb");
|
||||
config.setParam("DatabaseDriver","org.postgresql.Driver");
|
||||
config.setGcubeScope("/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab");
|
||||
|
||||
config.setParam("Layer","c565e32c-c5b3-4964-b44f-06dc620563e9");
|
||||
config.setParam("Z","0");
|
||||
config.setParam("TimeIndex","0");
|
||||
config.setParam("BBox_LowerLeftLat","-90");
|
||||
config.setParam("BBox_LowerLeftLong","-180");
|
||||
config.setParam("BBox_UpperRightLat","90");
|
||||
config.setParam("BBox_UpperRightLong","180");
|
||||
config.setParam("XResolution","0.5");
|
||||
config.setParam("YResolution","0.5");
|
||||
config.setParam("OutputTableName","testextraction");
|
||||
config.setParam("OutputTableLabel","testextraction");
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
private static AlgorithmConfiguration testXYExtractionAquaMaps() {
|
||||
|
||||
AlgorithmConfiguration config = testXYExtractionNetCDF();
|
||||
config.setParam("Layer","04e61cb8-3c32-47fe-823c-80ac3d417a0b");
|
||||
config.setParam("OutputTableName","testextractionaquamaps");
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
||||
private static AlgorithmConfiguration testXYExtractionTable() {
|
||||
|
||||
AlgorithmConfiguration config = testXYExtractionNetCDF();
|
||||
config.setAgent("XYEXTRACTOR_TABLE");
|
||||
|
||||
config.setParam("OutputTableName","testextractiontable");
|
||||
config.setParam("DatabaseUserName", "utente");
|
||||
config.setParam("DatabasePassword", "d4science");
|
||||
config.setParam("DatabaseURL", "jdbc:postgresql://statistical-manager.d.d4science.research-infrastructures.eu/testdb");
|
||||
config.setParam("DatabaseDriver", "org.postgresql.Driver");
|
||||
// vessels
|
||||
config.setParam(TableMatrixRepresentation.tableNameParameter, "generic_id037d302d_2ba0_4e43_b6e4_1a797bb91728");
|
||||
config.setParam(TableMatrixRepresentation.xDimensionColumnParameter, "x");
|
||||
config.setParam(TableMatrixRepresentation.yDimensionColumnParameter, "y");
|
||||
config.setParam(TableMatrixRepresentation.timeDimensionColumnParameter, "datetime");
|
||||
config.setParam(TableMatrixRepresentation.valueDimensionColumnParameter, "speed");
|
||||
config.setParam(TableMatrixRepresentation.filterParameter, "speed<2");
|
||||
|
||||
return config;
|
||||
}
|
||||
}
|
|
@ -46,16 +46,16 @@ public class RegressionTestMapsComparison {
|
|||
// config.setParam("Layer_2","c9a31223-cc00-4acd-bc5b-a0c76a7f79c7"); //humbolt squid
|
||||
|
||||
//FAO vs AquaMaps
|
||||
// config.setParam("Layer_1","b040894b-c5db-47fc-ba9c-d4fafcdcf620");
|
||||
// config.setParam("Layer_2","c9a31223-cc00-4acd-bc5b-a0c76a7f79c7");
|
||||
config.setParam("Layer_1","b040894b-c5db-47fc-ba9c-d4fafcdcf620");
|
||||
config.setParam("Layer_2","c9a31223-cc00-4acd-bc5b-a0c76a7f79c7");
|
||||
|
||||
//NetCDF vs NETCDF WOA
|
||||
// config.setParam("Layer_1","e0dbbcc0-8364-4087-8bcb-c7d95b2f55c8"); //statistical mean oxygen
|
||||
// config.setParam("Layer_2","49f5a5a1-80ff-4a00-8c84-dac29bda1a23");//statistical mean phosphate
|
||||
|
||||
//Eleutheronema tetradactylum
|
||||
config.setParam("Layer_1","fao-species-map-fot");
|
||||
config.setParam("Layer_2","c492f5d3-1cfc-44e3-b8d2-8530fec3e7e7");
|
||||
// config.setParam("Layer_1","fao-species-map-fot");
|
||||
// config.setParam("Layer_2","c492f5d3-1cfc-44e3-b8d2-8530fec3e7e7");
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue