git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@76862 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
bfeb12dca4
commit
a9dd7c8f4b
|
@ -1,36 +0,0 @@
|
|||
package org.gcube.dataanalysis.geo.test;
|
||||
|
||||
import org.gcube.contentmanagement.lexicalmatcher.utils.AnalysisLogger;
|
||||
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
||||
import org.gcube.dataanalysis.geo.algorithms.MapsComparator;
|
||||
import org.gcube.dataanalysis.geo.insertion.RasterTable;
|
||||
import org.gcube.dataanalysis.geo.retrieval.GeoIntersector;
|
||||
|
||||
public class TestMapsComparison {
|
||||
|
||||
static String cfg = "./cfg/";
|
||||
public static void main(String[] args) throws Exception{
|
||||
String layertitle = "Ice velocity u from [12-15-02 01:00] to [12-15-09 01:00] (2D) {Native grid ORCA025.L75 monthly average: Data extracted from dataset http://atoll-mercator.vlandata.cls.fr:44080/thredds/dodsC/global-reanalysis-phys-001-004-b-ref-fr-mjm95-icemod}";
|
||||
String layertitle2 = "Ice velocity v from [12-15-02 01:00] to [12-15-09 01:00] (2D) {Native grid ORCA025.L75 monthly average: Data extracted from dataset http://atoll-mercator.vlandata.cls.fr:44080/thredds/dodsC/global-reanalysis-phys-001-004-b-ref-fr-mjm95-icemod}";
|
||||
|
||||
AnalysisLogger.setLogger(cfg+AlgorithmConfiguration.defaultLoggerFile);
|
||||
AlgorithmConfiguration config = new AlgorithmConfiguration();
|
||||
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.setParam("LayerTitle_1",layertitle);
|
||||
config.setParam("LayerTitle_2",layertitle2);
|
||||
config.setParam("ValuesComparisonThreshold","0.01");
|
||||
config.setParam("Z","0");
|
||||
config.setGcubeScope(null);
|
||||
|
||||
MapsComparator mc = new MapsComparator();
|
||||
mc.setConfiguration(config);
|
||||
mc.init();
|
||||
mc.compute();
|
||||
mc.getOutput();
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
package org.gcube.dataanalysis.geo.test;
|
||||
|
||||
import org.gcube.contentmanagement.lexicalmatcher.utils.AnalysisLogger;
|
||||
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
||||
import org.gcube.dataanalysis.geo.algorithms.MapsComparator;
|
||||
import org.gcube.dataanalysis.geo.insertion.RasterTable;
|
||||
import org.gcube.dataanalysis.geo.retrieval.GeoIntersector;
|
||||
|
||||
public class TestMapsComparisonExampleTCOM {
|
||||
|
||||
static String cfg = "./cfg/";
|
||||
public static void main(String[] args) throws Exception{
|
||||
// String layertitle = "MyDistributionMap";
|
||||
// String layertitle = "Mass Concentration of Chlorophyll in Sea Water in [03-30-13 01:00] (3D) {Mercator Ocean BIOMER1V1R1: Data extracted from dataset http://atoll-mercator.vlandata.cls.fr:44080/thredds/dodsC/global-analysis-bio-001-008-a}";
|
||||
String layertitle2 = "FAO aquatic species distribution map of Eleutheronema tetradactylum";
|
||||
// String layertitle2 = "Objectively Analyzed Climatology in [07-01-01 01:00] (3D) {World Ocean Atlas 09: Sea Water Temperature - annual: dods://thredds.research-infrastructures.eu/thredds/dodsC/public/netcdf/temperature_annual_1deg_ENVIRONMENT_OCEANS_.nc}";
|
||||
// String layertitle2 = "FAO AQUATIC SPECIES DISTRIBUTION MAP OF MEGALASPIS CORDYLA";
|
||||
String layertitle = "FAO aquatic species distribution map of Leptomelanosoma indicum";
|
||||
|
||||
//{MEAN=1.01, VARIANCE=0.01, NUMBER_OF_ERRORS=1823, NUMBER_OF_COMPARISONS=260281, ACCURACY=99.3, MAXIMUM_ERROR=2.0, MAXIMUM_ERROR_POINT=1010:207:3, Resolution=0.5}
|
||||
|
||||
AnalysisLogger.setLogger(cfg+AlgorithmConfiguration.defaultLoggerFile);
|
||||
AlgorithmConfiguration config = new AlgorithmConfiguration();
|
||||
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.setParam("LayerTitle_1",layertitle);
|
||||
config.setParam("LayerTitle_2",layertitle2);
|
||||
config.setParam("Z","0");
|
||||
config.setGcubeScope(null);
|
||||
|
||||
MapsComparator mc = new MapsComparator();
|
||||
mc.setConfiguration(config);
|
||||
mc.init();
|
||||
mc.compute();
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package org.gcube.dataanalysis.geo.test;
|
||||
|
||||
import org.gcube.contentmanagement.lexicalmatcher.utils.AnalysisLogger;
|
||||
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
||||
import org.gcube.dataanalysis.geo.algorithms.MapsComparator;
|
||||
import org.gcube.dataanalysis.geo.insertion.RasterTable;
|
||||
import org.gcube.dataanalysis.geo.retrieval.GeoIntersector;
|
||||
|
||||
public class TestMapsComparisonTemperature {
|
||||
|
||||
static String cfg = "./cfg/";
|
||||
public static void main(String[] args) throws Exception{
|
||||
// String layertitle = "MyDistributionMap";
|
||||
// String layertitle = "Mass Concentration of Chlorophyll in Sea Water in [03-30-13 01:00] (3D) {Mercator Ocean BIOMER1V1R1: Data extracted from dataset http://atoll-mercator.vlandata.cls.fr:44080/thredds/dodsC/global-analysis-bio-001-008-a}";
|
||||
String layertitle = "Temperature in [12-15-09 01:00] (3D) {Native grid ORCA025.L75 monthly average: Data extracted from dataset http://atoll-mercator.vlandata.cls.fr:44080/thredds/dodsC/global-reanalysis-phys-001-004-b-ref-fr-mjm95-gridt}";
|
||||
String layertitle2 = "Statistical Mean in [07-01-01 01:00] (3D) {World Ocean Atlas 09: Sea Water Temperature - annual: dods://thredds.research-infrastructures.eu/thredds/dodsC/public/netcdf/temperature_annual_1deg_ENVIRONMENT_OCEANS_.nc}";
|
||||
// String layertitle2 = "Objectively Analyzed Climatology in [07-01-01 01:00] (3D) {World Ocean Atlas 09: Sea Water Temperature - annual: dods://thredds.research-infrastructures.eu/thredds/dodsC/public/netcdf/temperature_annual_1deg_ENVIRONMENT_OCEANS_.nc}";
|
||||
// String layertitle2 = "FAO AQUATIC SPECIES DISTRIBUTION MAP OF MEGALASPIS CORDYLA";
|
||||
// {MEAN=224.49, VARIANCE=10337.11, NUMBER_OF_ERRORS=47054, NUMBER_OF_COMPARISONS=65522, ACCURACY=28.19, MAXIMUM_ERROR=303.6, MAXIMUM_ERROR_POINT=5006:104, Resolution=0.9972222222222222}
|
||||
|
||||
AnalysisLogger.setLogger(cfg+AlgorithmConfiguration.defaultLoggerFile);
|
||||
AlgorithmConfiguration config = new AlgorithmConfiguration();
|
||||
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.setParam("LayerTitle_1",layertitle);
|
||||
config.setParam("LayerTitle_2",layertitle2);
|
||||
config.setParam("ValuesComparisonThreshold",""+100);
|
||||
config.setParam("Z","0");
|
||||
config.setGcubeScope(null);
|
||||
|
||||
MapsComparator mc = new MapsComparator();
|
||||
mc.setConfiguration(config);
|
||||
mc.init();
|
||||
mc.compute();
|
||||
mc.getOutput();
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package org.gcube.dataanalysis.geo.test;
|
||||
|
||||
import org.gcube.contentmanagement.lexicalmatcher.utils.AnalysisLogger;
|
||||
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
||||
import org.gcube.dataanalysis.geo.algorithms.MapsComparator;
|
||||
|
||||
public class TestMapsComparisonTemperatureWOA {
|
||||
|
||||
static String cfg = "./cfg/";
|
||||
public static void main(String[] args) throws Exception{
|
||||
String layertitle = "Temperature in [07-01-01 13:00] (3D) {World Ocean Atlas 2005: Tcl version: 8.4.13, NAP version: 6.2.2}";
|
||||
String layertitle2 = "Statistical Mean in [07-01-01 01:00] (3D) {World Ocean Atlas 09: Sea Water Temperature - annual: dods://thredds.research-infrastructures.eu/thredds/dodsC/public/netcdf/temperature_annual_1deg_ENVIRONMENT_OCEANS_.nc}";
|
||||
//{MEAN=0.0, VARIANCE=0.0, NUMBER_OF_ERRORS=0, NUMBER_OF_COMPARISONS=65522, ACCURACY=100.0, MAXIMUM_ERROR=0.0, MAXIMUM_ERROR_POINT=null, TREND=STATIONARY, Resolution=0.9972222222222222}
|
||||
|
||||
AnalysisLogger.setLogger(cfg+AlgorithmConfiguration.defaultLoggerFile);
|
||||
AlgorithmConfiguration config = new AlgorithmConfiguration();
|
||||
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.setParam("LayerTitle_1",layertitle);
|
||||
config.setParam("LayerTitle_2",layertitle2);
|
||||
config.setParam("ValuesComparisonThreshold",""+100);
|
||||
config.setParam("Z","0");
|
||||
config.setGcubeScope(null);
|
||||
|
||||
MapsComparator mc = new MapsComparator();
|
||||
mc.setConfiguration(config);
|
||||
mc.init();
|
||||
mc.compute();
|
||||
mc.getOutput();
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
package org.gcube.dataanalysis.geo.test;
|
||||
|
||||
import org.gcube.contentmanagement.lexicalmatcher.utils.AnalysisLogger;
|
||||
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
|
||||
import org.gcube.dataanalysis.geo.algorithms.MapsComparator;
|
||||
|
||||
public class TestMapsComparisoninTime {
|
||||
|
||||
static String cfg = "./cfg/";
|
||||
|
||||
public static void main(String[] args) throws Exception{
|
||||
|
||||
int[] timeIdx = {0,12,24,36,48,60,72,84,96,108,120};
|
||||
|
||||
for (int i=1;i<timeIdx.length;i++){
|
||||
compare(timeIdx[i-1], timeIdx[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void compare(int t1, int t2) throws Exception{
|
||||
String layertitle = "Temperature from [12-15-99 01:00] to [12-15-09 01:00] (2D) {Native grid ORCA025.L75 monthly average: Data extracted from dataset http://atoll-mercator.vlandata.cls.fr:44080/thredds/dodsC/global-reanalysis-phys-001-004-b-ref-fr-mjm95-gridt}";
|
||||
|
||||
//1vs0: {MEAN=6.23, VARIANCE=30.58, NUMBER_OF_ERRORS=39650, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.41, MAXIMUM_ERROR=45.35, MAXIMUM_ERROR_POINT=3215:143, Resolution=0.3525954946131244}
|
||||
|
||||
/*
|
||||
*********(12->0) {MEAN=3.88, VARIANCE=19.01, NUMBER_OF_ERRORS=39542, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.43, MAXIMUM_ERROR=53.99, MAXIMUM_ERROR_POINT=7309:456, TREND=EXPANSION, Resolution=0.3525954946131244} ELAPSED: 1370019613538
|
||||
*********(24->12) {MEAN=4.09, VARIANCE=20.62, NUMBER_OF_ERRORS=39502, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.44, MAXIMUM_ERROR=62.53, MAXIMUM_ERROR_POINT=1313:143, TREND=EXPANSION, Resolution=0.3525954946131244} ELAPSED: 1370019685180
|
||||
*********(36->24) {MEAN=4.51, VARIANCE=23.21, NUMBER_OF_ERRORS=39392, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.46, MAXIMUM_ERROR=61.79, MAXIMUM_ERROR_POINT=1314:465, TREND=EXPANSION, Resolution=0.3525954946131244} ELAPSED: 1370019754077
|
||||
*********(48->36) {MEAN=3.58, VARIANCE=15.35, NUMBER_OF_ERRORS=39416, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.45, MAXIMUM_ERROR=58.72, MAXIMUM_ERROR_POINT=7307:458, TREND=EXPANSION, Resolution=0.3525954946131244} ELAPSED: 1370019824148
|
||||
*********(60->48) {MEAN=3.39, VARIANCE=15.56, NUMBER_OF_ERRORS=39302, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.47, MAXIMUM_ERROR=44.23, MAXIMUM_ERROR_POINT=3215:110, TREND=STATIONARY, Resolution=0.3525954946131244} ELAPSED: 1370019892159
|
||||
*********(72->60) {MEAN=4.09, VARIANCE=20.81, NUMBER_OF_ERRORS=39435, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.45, MAXIMUM_ERROR=57.46, MAXIMUM_ERROR_POINT=7307:238, TREND=EXPANSION, Resolution=0.3525954946131244} ELAPSED: 1370019962031
|
||||
*********(84->72) {MEAN=4.17, VARIANCE=21.06, NUMBER_OF_ERRORS=39532, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.43, MAXIMUM_ERROR=63.19, MAXIMUM_ERROR_POINT=7307:247, TREND=STATIONARY, Resolution=0.3525954946131244} ELAPSED: 1370020032872
|
||||
*********(96->84) {MEAN=4.29, VARIANCE=22.09, NUMBER_OF_ERRORS=39392, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.46, MAXIMUM_ERROR=47.04, MAXIMUM_ERROR_POINT=7306:249, TREND=STATIONARY, Resolution=0.3525954946131244} ELAPSED: 1370020103268
|
||||
*********(108->96) {MEAN=3.84, VARIANCE=18.3, NUMBER_OF_ERRORS=39386, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.46, MAXIMUM_ERROR=44.61, MAXIMUM_ERROR_POINT=7306:249, TREND=EXPANSION, Resolution=0.3525954946131244} ELAPSED: 1370020172296
|
||||
*********(120->108) {MEAN=4.58, VARIANCE=25.6, NUMBER_OF_ERRORS=39461, NUMBER_OF_COMPARISONS=522242, ACCURACY=92.44, MAXIMUM_ERROR=49.62, MAXIMUM_ERROR_POINT=1316:352, TREND=EXPANSION, Resolution=0.3525954946131244} ELAPSED: 1370020244579
|
||||
|
||||
*/
|
||||
long t0=0;
|
||||
AnalysisLogger.setLogger(cfg+AlgorithmConfiguration.defaultLoggerFile);
|
||||
AlgorithmConfiguration config = new AlgorithmConfiguration();
|
||||
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.setParam("LayerTitle_1",layertitle);
|
||||
config.setParam("LayerTitle_2",layertitle);
|
||||
config.setParam("TimeIndex_1",""+t1);
|
||||
config.setParam("TimeIndex_2",""+t2);
|
||||
config.setParam("ValuesComparisonThreshold","0.01");
|
||||
config.setParam("Z","0");
|
||||
config.setGcubeScope(null);
|
||||
|
||||
MapsComparator mc = new MapsComparator();
|
||||
mc.setConfiguration(config);
|
||||
mc.init();
|
||||
mc.compute();
|
||||
mc.getOutput();
|
||||
System.out.println("*********("+t2+"->"+t1+") "+mc.outputParameters +" ELAPSED: "+(System.currentTimeMillis()-t0));
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue