git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@76476 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
607b06167a
commit
0b450065dc
|
@ -0,0 +1,42 @@
|
|||
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 = "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}
|
||||
|
||||
//{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("ValuesComparisonThreshold",""+100);
|
||||
config.setParam("Z","0");
|
||||
config.setGcubeScope(null);
|
||||
|
||||
MapsComparator mc = new MapsComparator();
|
||||
mc.setConfiguration(config);
|
||||
mc.init();
|
||||
mc.compute();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue