git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@92337 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
eadc863c18
commit
25f2a88395
|
@ -25,6 +25,7 @@ import org.gcube.dataanalysis.geo.connectors.netcdf.NetCDFDataExplorer;
|
|||
import org.gcube.dataanalysis.geo.infrastructure.GeoNetworkInspector;
|
||||
import org.gcube.dataanalysis.geo.matrixmodel.MatrixExtractor;
|
||||
import org.gcube.dataanalysis.geo.matrixmodel.RasterTable;
|
||||
import org.gcube.dataanalysis.geo.matrixmodel.XYExtractor;
|
||||
import org.jfree.chart.JFreeChart;
|
||||
import org.jfree.data.function.NormalDistributionFunction2D;
|
||||
import org.jfree.data.general.DatasetUtilities;
|
||||
|
@ -108,7 +109,7 @@ public class MapsComparator extends DataAnalysis {
|
|||
// scope = "/gcube";
|
||||
// String scope = null;
|
||||
AnalysisLogger.getLogger().debug("MapsComparator: Using Scope: " + scope + " Z: " + z + " Values Threshold: " + valuesthreshold + " Layer1: " + layerT1 + " vs " + layerT2);
|
||||
MatrixExtractor intersector = new MatrixExtractor(config);
|
||||
XYExtractor intersector = new XYExtractor (config);
|
||||
AnalysisLogger.getLogger().debug("MapsComparator: MatrixExtractor initialized");
|
||||
|
||||
status = 10;
|
||||
|
@ -118,7 +119,7 @@ public class MapsComparator extends DataAnalysis {
|
|||
AnalysisLogger.getLogger().debug("MapsComparator: Evaluation Indeed at Resolution: " + resolution);
|
||||
|
||||
AnalysisLogger.getLogger().debug("MapsComparator: ****Rasterizing map 1****");
|
||||
double[][] slice1 = intersector.takeTimeInstantMatrix(layerT1, time1, BBxLL, BBxUR, BByLL, BByUR, z, resolution, resolution);
|
||||
double[][] slice1 = intersector.extractXYGrid(layerT1, time1, BBxLL, BBxUR, BByLL, BByUR, z, resolution, resolution);
|
||||
AnalysisLogger.getLogger().debug("MapsComparator: Dumping map 1");
|
||||
status = 30;
|
||||
RasterTable raster1 = new RasterTable(BBxLL, BBxUR, BByLL, BByUR, z, resolution, resolution, slice1, config);
|
||||
|
@ -127,7 +128,7 @@ public class MapsComparator extends DataAnalysis {
|
|||
AnalysisLogger.getLogger().debug("MapsComparator: Map 1 was dumped in table: " + rastertable1);
|
||||
status = 40;
|
||||
AnalysisLogger.getLogger().debug("MapsComparator: ****Rasterizing map 2****");
|
||||
double[][] slice2 = intersector.takeTimeInstantMatrix(layerT2, time2, BBxLL, BBxUR, BByLL, BByUR, z, resolution, resolution);
|
||||
double[][] slice2 = intersector.extractXYGrid(layerT2, time2, BBxLL, BBxUR, BByLL, BByUR, z, resolution, resolution);
|
||||
AnalysisLogger.getLogger().debug("MapsComparator: Dumping map 2");
|
||||
status = 50;
|
||||
RasterTable raster2 = new RasterTable(BBxLL, BBxUR, BByLL, BByUR, z, resolution, resolution, slice2, config);
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.gcube.dataanalysis.executor.job.management.QueueJobManager;
|
|||
import org.gcube.dataanalysis.geo.connectors.netcdf.NetCDFDataExplorer;
|
||||
import org.gcube.dataanalysis.geo.infrastructure.GeoNetworkInspector;
|
||||
import org.gcube.dataanalysis.geo.matrixmodel.MatrixExtractor;
|
||||
import org.gcube.dataanalysis.geo.matrixmodel.XYExtractor;
|
||||
import org.opengis.metadata.Metadata;
|
||||
|
||||
import ucar.nc2.dt.GridDatatype;
|
||||
|
@ -262,12 +263,12 @@ public class MapsComparatorNode extends ActorNode{
|
|||
|
||||
int positivescount = 0;
|
||||
if (slicey1<=y2){
|
||||
MatrixExtractor intersector = new MatrixExtractor(config);
|
||||
XYExtractor intersector = new XYExtractor(config);
|
||||
AnalysisLogger.getLogger().debug("MapsComparator: GeoIntersector initialized");
|
||||
AnalysisLogger.getLogger().debug("MapsComparator: ****Rasterizing map 1 in the range: ("+x1+" , "+slicey1+"; "+x2+" , "+slicey2+") with res "+resolution);
|
||||
double[][] slice1 = intersector.takeTimeInstantMatrix(layerT1, time1, x1, x2, slicey1, slicey2, z, resolution, resolution);
|
||||
double[][] slice1 = intersector.extractXYGrid(layerT1, time1, x1, x2, slicey1, slicey2, z, resolution, resolution);
|
||||
AnalysisLogger.getLogger().debug("MapsComparator: ****Rasterizing map 2 in the range: ("+x1+" , "+slicey1+"; "+x2+" , "+slicey2+") with res "+resolution);
|
||||
double[][] slice2 = intersector.takeTimeInstantMatrix(layerT2, time1, x1, x2, slicey1, slicey2, z, resolution, resolution);
|
||||
double[][] slice2 = intersector.extractXYGrid(layerT2, time1, x1, x2, slicey1, slicey2, z, resolution, resolution);
|
||||
int xsize = slice1[0].length;
|
||||
int ysize = slice1.length;
|
||||
|
||||
|
|
Loading…
Reference in New Issue