git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@76712 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
872d1260b2
commit
1c98739124
|
@ -20,9 +20,6 @@ import org.xml.sax.InputSource;
|
|||
|
||||
import ucar.ma2.Array;
|
||||
import ucar.ma2.ArrayFloat;
|
||||
import ucar.ma2.Index;
|
||||
import ucar.ma2.Index2D;
|
||||
import ucar.ma2.Index3D;
|
||||
import ucar.ma2.Range;
|
||||
import ucar.ma2.StructureData;
|
||||
import ucar.ma2.StructureMembers.Member;
|
||||
|
@ -120,8 +117,11 @@ public class ThreddsDataExplorer {
|
|||
CoordinateAxis zAxis = gdt.getCoordinateSystem().getVerticalAxis();
|
||||
CoordinateAxis xAxis = gdt.getCoordinateSystem().getXHorizAxis();
|
||||
CoordinateAxis yAxis = gdt.getCoordinateSystem().getYHorizAxis();
|
||||
|
||||
double resolutionZ = Math.abs((double) (zAxis.getMaxValue() - zAxis.getMinValue()) / (double) zAxis.getShape()[0]);
|
||||
double resolutionZ = 0;
|
||||
try{
|
||||
resolutionZ = Math.abs((double) (zAxis.getMaxValue() - zAxis.getMinValue()) / (double) zAxis.getShape()[0]);
|
||||
AnalysisLogger.getLogger().debug("Zmin:"+ zAxis.getMinValue()+" Zmax:"+zAxis.getMaxValue());
|
||||
}catch(Exception e){};
|
||||
double resolutionX = Math.abs((double) (xAxis.getMaxValue() - xAxis.getMinValue()) / (double) xAxis.getShape()[0]);
|
||||
double resolutionY = Math.abs((double) (yAxis.getMaxValue() - yAxis.getMinValue()) / (double) yAxis.getShape()[0]);
|
||||
|
||||
|
@ -142,6 +142,12 @@ public class ThreddsDataExplorer {
|
|||
xD=shapeD[2];
|
||||
}
|
||||
|
||||
else if (shapeD.length>1)
|
||||
{
|
||||
yD=shapeD[0];
|
||||
xD=shapeD[1];
|
||||
}
|
||||
|
||||
AnalysisLogger.getLogger().debug("Shape: Z:"+zD+" X:"+ xD+" Y:"+yD);
|
||||
|
||||
AnalysisLogger.getLogger().debug("Layer Information Retrieval ELAPSED Time: " + (System.currentTimeMillis() - t01));
|
||||
|
@ -153,7 +159,7 @@ public class ThreddsDataExplorer {
|
|||
data3 = (ArrayFloat.D3) data;
|
||||
else
|
||||
data2 = (ArrayFloat.D2) data;
|
||||
AnalysisLogger.getLogger().debug("Z dimension: "+zD+" Zmin:"+ zAxis.getMinValue()+" Zmax:"+zAxis.getMaxValue());
|
||||
|
||||
|
||||
double xmin = xAxis.getMinValue();
|
||||
double xmax = xAxis.getMaxValue();
|
||||
|
@ -205,6 +211,7 @@ public class ThreddsDataExplorer {
|
|||
val = Double.valueOf(data3.get(zint, yint, xint));
|
||||
}else if (data2 != null)
|
||||
val = Double.valueOf(data2.get(yint, xint));
|
||||
|
||||
values.add(val);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue