mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
extract meteoinfo-ndarray module
This commit is contained in:
parent
2711f77797
commit
b44995be9a
47
.idea/compiler.xml
generated
47
.idea/compiler.xml
generated
@ -1,24 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="MeteoInfoLab" />
|
||||
<module name="MeteoInfoLib" />
|
||||
<module name="MeteoInfoMap" />
|
||||
<module name="meteoinfo-console" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="MeteoInfo" target="1.8" />
|
||||
<module name="meteoinfo-console" target="1.8" />
|
||||
<module name="meteoinfo-numeric" target="1.8" />
|
||||
<module name="MeteoInfoLab" target="1.8" />
|
||||
<module name="MeteoInfoLib" target="1.8" />
|
||||
<module name="MeteoInfoMap" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="meteoinfo-ndarray" />
|
||||
<module name="MeteoInfoLab" />
|
||||
<module name="MeteoInfoLib" />
|
||||
<module name="MeteoInfoMap" />
|
||||
<module name="meteoinfo-console" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="MeteoInfo" target="1.8" />
|
||||
<module name="meteoinfo-console" target="1.8" />
|
||||
<module name="meteoinfo-ndarray" target="1.8" />
|
||||
<module name="MeteoInfoLab" target="1.8" />
|
||||
<module name="MeteoInfoLib" target="1.8" />
|
||||
<module name="MeteoInfoMap" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
||||
2
.idea/encodings.xml
generated
2
.idea/encodings.xml
generated
@ -13,5 +13,7 @@
|
||||
<file url="file://$PROJECT_DIR$/MeteoInfoMap/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/meteoinfo-console/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/meteoinfo-console/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/meteoinfo-ndarray/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/meteoinfo-ndarray/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
13
.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml
generated
Normal file
13
.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_2.xml
generated
Normal file
@ -0,0 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.google.code.findbugs:jsr305:3.0.2">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
23
.idea/modules.xml
generated
23
.idea/modules.xml
generated
@ -1,12 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfo.iml" filepath="$PROJECT_DIR$/MeteoInfo.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfoLab/MeteoInfoLab.iml" filepath="$PROJECT_DIR$/MeteoInfoLab/MeteoInfoLab.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfoLib/MeteoInfoLib.iml" filepath="$PROJECT_DIR$/MeteoInfoLib/MeteoInfoLib.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfoMap/MeteoInfoMap.iml" filepath="$PROJECT_DIR$/MeteoInfoMap/MeteoInfoMap.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/meteoinfo-console/meteoinfo-console.iml" filepath="$PROJECT_DIR$/meteoinfo-console/meteoinfo-console.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfo.iml" filepath="$PROJECT_DIR$/MeteoInfo.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfoLab/MeteoInfoLab.iml" filepath="$PROJECT_DIR$/MeteoInfoLab/MeteoInfoLab.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfoLib/MeteoInfoLib.iml" filepath="$PROJECT_DIR$/MeteoInfoLib/MeteoInfoLib.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/MeteoInfoMap/MeteoInfoMap.iml" filepath="$PROJECT_DIR$/MeteoInfoMap/MeteoInfoMap.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/meteoinfo-console/meteoinfo-console.iml" filepath="$PROJECT_DIR$/meteoinfo-console/meteoinfo-console.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/meteoinfo-ndarray/meteoinfo-ndarray.iml" filepath="$PROJECT_DIR$/meteoinfo-ndarray/meteoinfo-ndarray.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@ -22,6 +22,8 @@
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module" module-name="MeteoInfoLib" />
|
||||
<orderEntry type="module" module-name="meteoinfo-ndarray" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: edu.ucar:netcdfAll:5.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.l2fprod:l2fprod-common-all:0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freehep:freehep-graphics2d:2.4" level="project" />
|
||||
|
||||
@ -13,19 +13,16 @@
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\satellite"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\hdf"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\satellite\modis"/>
|
||||
<RecentFolder Folder="Z:\benchmark\script"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\netcdf"/>
|
||||
</Path>
|
||||
<File>
|
||||
<OpenedFiles>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\city_streamslice_zslice_index.py"/>
|
||||
<OpenedFile File="Z:\benchmark\script\plot_pm_overlay.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\netcdf\dimension_reverse.py"/>
|
||||
</OpenedFiles>
|
||||
<RecentFiles>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\city_streamslice_zslice_index.py"/>
|
||||
<RecentFile File="Z:\benchmark\script\plot_pm_overlay.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\netcdf\dimension_reverse.py"/>
|
||||
</RecentFiles>
|
||||
</File>
|
||||
@ -34,5 +31,5 @@
|
||||
</Font>
|
||||
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
|
||||
<Figure DoubleBuffering="true"/>
|
||||
<Startup MainFormLocation="0,0" MainFormSize="1350,823"/>
|
||||
<Startup MainFormLocation="0,0" MainFormSize="1280,680"/>
|
||||
</MeteoInfo>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.meteothink</groupId>
|
||||
<artifactId>MeteoInfo</artifactId>
|
||||
<version>2.4.6</version>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
<artifactId>MeteoInfoLab</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="meteoinfo-ndarray" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: edu.ucar:netcdfAll:5.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.l2fprod:l2fprod-common-all:0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freehep:freehep-graphics2d:2.4" level="project" />
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.meteothink</groupId>
|
||||
<artifactId>MeteoInfo</artifactId>
|
||||
<version>2.4.6</version>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>MeteoInfoLib</artifactId>
|
||||
@ -47,6 +47,11 @@
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>meteoinfo-ndarray</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>edu.ucar</groupId>
|
||||
<artifactId>netcdfAll</artifactId>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -26,10 +26,9 @@ import org.meteoinfo.chart.plot.YAlign;
|
||||
import org.meteoinfo.drawing.Draw;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.global.MIMath;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.global.util.DateUtil;
|
||||
import org.meteoinfo.global.util.JDateUtil;
|
||||
import org.meteoinfo.legend.LineStyles;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -17,7 +17,6 @@ import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.meteoinfo.chart.ChartText;
|
||||
import org.meteoinfo.chart.jogl.SurfaceGraphics;
|
||||
import org.meteoinfo.chart.plot3d.GraphicCollection3D;
|
||||
import org.meteoinfo.math.ArrayMath;
|
||||
import org.meteoinfo.math.ArrayUtil;
|
||||
@ -33,7 +32,6 @@ import org.meteoinfo.global.Extent;
|
||||
import org.meteoinfo.global.Extent3D;
|
||||
import org.meteoinfo.global.MIMath;
|
||||
import org.meteoinfo.global.PointD;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.layer.ImageLayer;
|
||||
import org.meteoinfo.layer.VectorLayer;
|
||||
import org.meteoinfo.legend.ArrowLineBreak;
|
||||
@ -52,6 +50,7 @@ import org.meteoinfo.legend.PolylineBreak;
|
||||
import org.meteoinfo.legend.StreamlineBreak;
|
||||
import org.meteoinfo.math.meteo.MeteoMath;
|
||||
import org.meteoinfo.ndarray.*;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.shape.*;
|
||||
import wcontour.Contour;
|
||||
import wcontour.global.Point3D;
|
||||
|
||||
@ -21,10 +21,10 @@ import static org.meteoinfo.drawing.Draw.getDashPattern;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.global.Extent;
|
||||
import org.meteoinfo.global.MIMath;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.legend.LineStyles;
|
||||
import org.meteoinfo.shape.Graphic;
|
||||
import org.meteoinfo.shape.GraphicCollection;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -32,9 +32,9 @@ import java.util.logging.Logger;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import org.meteoinfo.ndarray.*;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.data.meteodata.GridDataSetting;
|
||||
import org.meteoinfo.geoprocess.analysis.ResampleMethods;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.legend.LegendManage;
|
||||
import org.meteoinfo.projection.KnownCoordinateSystems;
|
||||
import org.meteoinfo.projection.info.ProjectionInfo;
|
||||
|
||||
@ -37,7 +37,6 @@ import org.meteoinfo.ndarray.DimensionType;
|
||||
import org.meteoinfo.data.meteodata.GridDataSetting;
|
||||
import org.meteoinfo.geoprocess.analysis.ResampleMethods;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.layer.VectorLayer;
|
||||
import org.meteoinfo.projection.KnownCoordinateSystems;
|
||||
import org.meteoinfo.projection.info.ProjectionInfo;
|
||||
@ -48,6 +47,7 @@ import org.meteoinfo.shape.ShapeTypes;
|
||||
import org.meteoinfo.ndarray.Array;
|
||||
import org.meteoinfo.ndarray.DataType;
|
||||
import org.meteoinfo.ndarray.IndexIterator;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -34,7 +34,7 @@ import org.meteoinfo.data.mapdata.geotiff.compression.CompressionDecoder;
|
||||
import org.meteoinfo.data.mapdata.geotiff.compression.DeflateCompression;
|
||||
import org.meteoinfo.data.mapdata.geotiff.compression.LZWCompression;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.projection.KnownCoordinateSystems;
|
||||
import org.meteoinfo.projection.info.ProjectionInfo;
|
||||
import org.meteoinfo.ndarray.Array;
|
||||
|
||||
@ -24,8 +24,6 @@ import org.meteoinfo.data.dataframe.DataFrame;
|
||||
import org.meteoinfo.table.DataTable;
|
||||
import org.meteoinfo.ndarray.DataType;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author yaqiang
|
||||
|
||||
@ -19,6 +19,7 @@ import org.meteoinfo.data.meteodata.DataInfo;
|
||||
import org.meteoinfo.global.util.JDateUtil;
|
||||
import org.meteoinfo.ndarray.Dimension;
|
||||
import org.meteoinfo.ndarray.DimensionType;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.data.meteodata.IGridDataInfo;
|
||||
import org.meteoinfo.data.meteodata.Variable;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
@ -40,7 +41,6 @@ import java.util.logging.Logger;
|
||||
import org.meteoinfo.data.GridArray;
|
||||
import org.meteoinfo.data.meteodata.MeteoDataType;
|
||||
import org.meteoinfo.global.MIMath;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.locationtech.proj4j.proj.Projection;
|
||||
import org.meteoinfo.projection.KnownCoordinateSystems;
|
||||
import org.meteoinfo.projection.info.ProjectionInfo;
|
||||
|
||||
@ -34,7 +34,6 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.meteoinfo.data.GridArray;
|
||||
import org.meteoinfo.data.meteodata.MeteoDataType;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.ndarray.Array;
|
||||
import org.meteoinfo.ndarray.DataType;
|
||||
import org.meteoinfo.ndarray.IndexIterator;
|
||||
@ -42,6 +41,7 @@ import org.meteoinfo.ndarray.InvalidRangeException;
|
||||
import org.meteoinfo.ndarray.Range;
|
||||
import org.meteoinfo.ndarray.Section;
|
||||
import org.meteoinfo.data.meteodata.Attribute;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -21,6 +21,7 @@ import org.meteoinfo.data.meteodata.IGridDataInfo;
|
||||
import org.meteoinfo.data.meteodata.Variable;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.io.EndianDataOutputStream;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.projection.KnownCoordinateSystems;
|
||||
import org.meteoinfo.projection.info.ProjectionInfo;
|
||||
import org.meteoinfo.projection.Reproject;
|
||||
@ -51,7 +52,6 @@ import org.meteoinfo.data.meteodata.StationInfoData;
|
||||
import org.meteoinfo.data.meteodata.StationModelData;
|
||||
import org.meteoinfo.data.meteodata.arl.ARLDataInfo;
|
||||
import org.meteoinfo.global.Extent;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.ndarray.Array;
|
||||
import org.meteoinfo.ndarray.DataType;
|
||||
import org.meteoinfo.ndarray.IndexIterator;
|
||||
|
||||
@ -35,7 +35,6 @@ import org.meteoinfo.data.GridArray;
|
||||
import org.meteoinfo.data.meteodata.MeteoDataType;
|
||||
import org.meteoinfo.data.meteodata.arl.ARLDataInfo;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.ndarray.Array;
|
||||
import org.meteoinfo.ndarray.DataType;
|
||||
import org.meteoinfo.ndarray.IndexIterator;
|
||||
@ -43,8 +42,9 @@ import org.meteoinfo.ndarray.InvalidRangeException;
|
||||
import org.meteoinfo.ndarray.Range;
|
||||
import org.meteoinfo.ndarray.Section;
|
||||
import org.meteoinfo.data.meteodata.Attribute;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @author yaqiang
|
||||
*/
|
||||
|
||||
@ -33,7 +33,6 @@ import org.meteoinfo.data.meteodata.IGridDataInfo;
|
||||
import org.meteoinfo.data.meteodata.MeteoDataType;
|
||||
import org.meteoinfo.data.meteodata.Variable;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.ndarray.Array;
|
||||
import org.meteoinfo.ndarray.DataType;
|
||||
import org.meteoinfo.ndarray.IndexIterator;
|
||||
@ -41,6 +40,7 @@ import org.meteoinfo.ndarray.InvalidRangeException;
|
||||
import org.meteoinfo.ndarray.Range;
|
||||
import org.meteoinfo.ndarray.Section;
|
||||
import org.meteoinfo.data.meteodata.Attribute;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -13,12 +13,12 @@
|
||||
*/
|
||||
package org.meteoinfo.global;
|
||||
|
||||
import org.meteoinfo.data.mapdata.Field;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.shape.PointZ;
|
||||
import org.meteoinfo.shape.Shape;
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ import java.util.List;
|
||||
|
||||
import org.joda.time.*;
|
||||
import org.joda.time.format.DateTimeFormatter;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package org.meteoinfo.global.util;
|
||||
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
|
||||
import java.time.*;
|
||||
import java.time.chrono.ChronoPeriod;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
package org.meteoinfo.legend;
|
||||
|
||||
import org.meteoinfo.layer.FrmLayerProperty;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.shape.ShapeTypes;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
@ -16,7 +17,6 @@ import java.util.logging.Logger;
|
||||
import javax.swing.JOptionPane;
|
||||
import org.meteoinfo.global.colors.ColorMap;
|
||||
import org.meteoinfo.global.colors.ColorUtil;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.ui.ColorComboBoxModel;
|
||||
import org.meteoinfo.ui.ColorListCellRender;
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@ import org.meteoinfo.data.GridData;
|
||||
import org.meteoinfo.data.StationData;
|
||||
import org.meteoinfo.drawing.ContourDraw;
|
||||
import org.meteoinfo.global.MIMath;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.shape.ShapeTypes;
|
||||
import java.awt.Color;
|
||||
import java.io.IOException;
|
||||
@ -26,16 +27,13 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import org.meteoinfo.data.GridArray;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.global.colors.ColorMap;
|
||||
import org.meteoinfo.global.colors.ColorUtil;
|
||||
import org.meteoinfo.layer.VectorLayer;
|
||||
import org.meteoinfo.shape.PointShape;
|
||||
import org.meteoinfo.shape.PolygonShape;
|
||||
import org.meteoinfo.shape.PolylineShape;
|
||||
import org.meteoinfo.shape.Shape;
|
||||
import wcontour.Legend;
|
||||
|
||||
/**
|
||||
* Legend manage class
|
||||
|
||||
@ -41,6 +41,7 @@ import org.meteoinfo.global.MIMath;
|
||||
import org.meteoinfo.global.PointD;
|
||||
import org.meteoinfo.global.PointF;
|
||||
import org.meteoinfo.ndarray.DataType;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.layer.ChartSet;
|
||||
import org.meteoinfo.layer.ImageLayer;
|
||||
import org.meteoinfo.layer.LabelSet;
|
||||
@ -167,7 +168,6 @@ import org.meteoinfo.global.event.IShapeSelectedListener;
|
||||
import org.meteoinfo.global.event.IUndoEditListener;
|
||||
import org.meteoinfo.global.event.ShapeSelectedEvent;
|
||||
import org.meteoinfo.global.event.UndoEditEvent;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.global.util.GeoUtil;
|
||||
import org.meteoinfo.image.ImageUtil;
|
||||
import org.meteoinfo.layer.VisibleScale;
|
||||
|
||||
@ -36,14 +36,13 @@ import org.meteoinfo.geoprocess.GeoComputation;
|
||||
import org.meteoinfo.global.DataConvert;
|
||||
import org.meteoinfo.global.MIMath;
|
||||
import org.meteoinfo.global.PointD;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
import org.meteoinfo.global.util.GlobalUtil;
|
||||
import org.meteoinfo.global.util.JDateUtil;
|
||||
import org.meteoinfo.io.EndianDataOutputStream;
|
||||
import org.meteoinfo.layer.ChartSet;
|
||||
import org.meteoinfo.math.spatial.KDTree;
|
||||
import org.meteoinfo.math.spatial.KDTree.SearchResult;
|
||||
import org.meteoinfo.ndarray.*;
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
import org.meteoinfo.shape.PolygonShape;
|
||||
|
||||
/**
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="MeteoInfoLib" />
|
||||
<orderEntry type="module" module-name="meteoinfo-ndarray" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: edu.ucar:netcdfAll:5.4.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.l2fprod:l2fprod-common-all:0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freehep:freehep-graphics2d:2.4" level="project" />
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.meteothink</groupId>
|
||||
<artifactId>MeteoInfo</artifactId>
|
||||
<version>2.4.6</version>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
<artifactId>MeteoInfoMap</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>MeteoInfo</artifactId>
|
||||
<groupId>org.meteothink</groupId>
|
||||
<version>2.4.6</version>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
17
meteoinfo-ndarray/meteoinfo-ndarray.iml
Normal file
17
meteoinfo-ndarray/meteoinfo-ndarray.iml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
34
meteoinfo-ndarray/pom.xml
Normal file
34
meteoinfo-ndarray/pom.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>org.meteothink</groupId>
|
||||
<artifactId>MeteoInfo</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>meteoinfo-ndarray</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-math3</artifactId>
|
||||
<version>3.6.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -33,11 +33,11 @@
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.nio.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.nio.*;
|
||||
|
||||
/**
|
||||
* Superclass for implementations of multidimensional arrays. An Array has a
|
||||
@ -60,21 +60,21 @@ public class ArrayBoolean extends Array {
|
||||
static ArrayBoolean factory(Index index, boolean[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayBoolean.D0(index, storage);
|
||||
return new D0(index, storage);
|
||||
case 1:
|
||||
return new ArrayBoolean.D1(index, storage);
|
||||
return new D1(index, storage);
|
||||
case 2:
|
||||
return new ArrayBoolean.D2(index, storage);
|
||||
return new D2(index, storage);
|
||||
case 3:
|
||||
return new ArrayBoolean.D3(index, storage);
|
||||
return new D3(index, storage);
|
||||
case 4:
|
||||
return new ArrayBoolean.D4(index, storage);
|
||||
return new D4(index, storage);
|
||||
case 5:
|
||||
return new ArrayBoolean.D5(index, storage);
|
||||
return new D5(index, storage);
|
||||
case 6:
|
||||
return new ArrayBoolean.D6(index, storage);
|
||||
return new D6(index, storage);
|
||||
case 7:
|
||||
return new ArrayBoolean.D7(index, storage);
|
||||
return new D7(index, storage);
|
||||
default:
|
||||
return new ArrayBoolean(index, storage);
|
||||
}
|
||||
@ -62,21 +62,21 @@ public class ArrayByte extends Array {
|
||||
static ArrayByte factory(Index index, boolean isUnsigned, byte[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayByte.D0(index, isUnsigned, storage);
|
||||
return new D0(index, isUnsigned, storage);
|
||||
case 1:
|
||||
return new ArrayByte.D1(index, isUnsigned, storage);
|
||||
return new D1(index, isUnsigned, storage);
|
||||
case 2:
|
||||
return new ArrayByte.D2(index, isUnsigned, storage);
|
||||
return new D2(index, isUnsigned, storage);
|
||||
case 3:
|
||||
return new ArrayByte.D3(index, isUnsigned, storage);
|
||||
return new D3(index, isUnsigned, storage);
|
||||
case 4:
|
||||
return new ArrayByte.D4(index, isUnsigned, storage);
|
||||
return new D4(index, isUnsigned, storage);
|
||||
case 5:
|
||||
return new ArrayByte.D5(index, isUnsigned, storage);
|
||||
return new D5(index, isUnsigned, storage);
|
||||
case 6:
|
||||
return new ArrayByte.D6(index, isUnsigned, storage);
|
||||
return new D6(index, isUnsigned, storage);
|
||||
case 7:
|
||||
return new ArrayByte.D7(index, isUnsigned, storage);
|
||||
return new D7(index, isUnsigned, storage);
|
||||
default:
|
||||
return new ArrayByte(index, isUnsigned, storage);
|
||||
}
|
||||
@ -63,21 +63,21 @@ public class ArrayChar extends Array {
|
||||
static ArrayChar factory(Index index, char[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayChar.D0(index, storage);
|
||||
return new D0(index, storage);
|
||||
case 1:
|
||||
return new ArrayChar.D1(index, storage);
|
||||
return new D1(index, storage);
|
||||
case 2:
|
||||
return new ArrayChar.D2(index, storage);
|
||||
return new D2(index, storage);
|
||||
case 3:
|
||||
return new ArrayChar.D3(index, storage);
|
||||
return new D3(index, storage);
|
||||
case 4:
|
||||
return new ArrayChar.D4(index, storage);
|
||||
return new D4(index, storage);
|
||||
case 5:
|
||||
return new ArrayChar.D5(index, storage);
|
||||
return new D5(index, storage);
|
||||
case 6:
|
||||
return new ArrayChar.D6(index, storage);
|
||||
return new D6(index, storage);
|
||||
case 7:
|
||||
return new ArrayChar.D7(index, storage);
|
||||
return new D7(index, storage);
|
||||
default:
|
||||
return new ArrayChar(index, storage);
|
||||
}
|
||||
@ -909,10 +909,10 @@ public class ArrayChar extends Array {
|
||||
*/
|
||||
public ArrayObject make1DStringArray() {
|
||||
int nelems = (getRank() == 0) ? 1 : (int) getSize() / indexCalc.getShape(getRank() - 1);
|
||||
Array sarr = Array.factory(String.class, new int[]{nelems});
|
||||
Array sarr = factory(String.class, new int[]{nelems});
|
||||
IndexIterator newsiter = sarr.getIndexIterator();
|
||||
|
||||
ArrayChar.StringIterator siter = getStringIterator();
|
||||
StringIterator siter = getStringIterator();
|
||||
while (siter.hasNext()) {
|
||||
newsiter.setObjectNext(siter.next());
|
||||
}
|
||||
@ -927,7 +927,7 @@ public class ArrayChar extends Array {
|
||||
* @return equivilent ArrayChar
|
||||
*/
|
||||
public static ArrayChar makeFromString(String s, int max) {
|
||||
ArrayChar result = new ArrayChar.D1(max);
|
||||
ArrayChar result = new D1(max);
|
||||
for (int i = 0; i < max && i < s.length(); i++) {
|
||||
result.setChar(i, s.charAt(i));
|
||||
}
|
||||
@ -985,7 +985,7 @@ public class ArrayChar extends Array {
|
||||
}
|
||||
|
||||
// ready to create the char Array
|
||||
Array carr = Array.factory(char.class, shape, cdata);
|
||||
Array carr = factory(char.class, shape, cdata);
|
||||
return (ArrayChar) carr;
|
||||
} catch (InvalidRangeException e) {
|
||||
e.printStackTrace(); // cant happen.
|
||||
@ -61,21 +61,21 @@ public class ArrayComplex extends Array {
|
||||
static ArrayComplex factory(Index index, Complex[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayComplex.D0(index, storage);
|
||||
return new D0(index, storage);
|
||||
case 1:
|
||||
return new ArrayComplex.D1(index, storage);
|
||||
return new D1(index, storage);
|
||||
case 2:
|
||||
return new ArrayComplex.D2(index, storage);
|
||||
return new D2(index, storage);
|
||||
case 3:
|
||||
return new ArrayComplex.D3(index, storage);
|
||||
return new D3(index, storage);
|
||||
case 4:
|
||||
return new ArrayComplex.D4(index, storage);
|
||||
return new D4(index, storage);
|
||||
case 5:
|
||||
return new ArrayComplex.D5(index, storage);
|
||||
return new D5(index, storage);
|
||||
case 6:
|
||||
return new ArrayComplex.D6(index, storage);
|
||||
return new D6(index, storage);
|
||||
case 7:
|
||||
return new ArrayComplex.D7(index, storage);
|
||||
return new D7(index, storage);
|
||||
default:
|
||||
return new ArrayComplex(index, storage);
|
||||
}
|
||||
@ -61,21 +61,21 @@ public class ArrayDate extends Array {
|
||||
static ArrayDate factory(Index index, LocalDateTime[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayDate.D0(index, storage);
|
||||
return new D0(index, storage);
|
||||
case 1:
|
||||
return new ArrayDate.D1(index, storage);
|
||||
return new D1(index, storage);
|
||||
case 2:
|
||||
return new ArrayDate.D2(index, storage);
|
||||
return new D2(index, storage);
|
||||
case 3:
|
||||
return new ArrayDate.D3(index, storage);
|
||||
return new D3(index, storage);
|
||||
case 4:
|
||||
return new ArrayDate.D4(index, storage);
|
||||
return new D4(index, storage);
|
||||
case 5:
|
||||
return new ArrayDate.D5(index, storage);
|
||||
return new D5(index, storage);
|
||||
case 6:
|
||||
return new ArrayDate.D6(index, storage);
|
||||
return new D6(index, storage);
|
||||
case 7:
|
||||
return new ArrayDate.D7(index, storage);
|
||||
return new D7(index, storage);
|
||||
default:
|
||||
return new ArrayDate(index, storage);
|
||||
}
|
||||
@ -61,21 +61,21 @@ public class ArrayDouble extends Array {
|
||||
static ArrayDouble factory(Index index, double[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayDouble.D0(index, storage);
|
||||
return new D0(index, storage);
|
||||
case 1:
|
||||
return new ArrayDouble.D1(index, storage);
|
||||
return new D1(index, storage);
|
||||
case 2:
|
||||
return new ArrayDouble.D2(index, storage);
|
||||
return new D2(index, storage);
|
||||
case 3:
|
||||
return new ArrayDouble.D3(index, storage);
|
||||
return new D3(index, storage);
|
||||
case 4:
|
||||
return new ArrayDouble.D4(index, storage);
|
||||
return new D4(index, storage);
|
||||
case 5:
|
||||
return new ArrayDouble.D5(index, storage);
|
||||
return new D5(index, storage);
|
||||
case 6:
|
||||
return new ArrayDouble.D6(index, storage);
|
||||
return new D6(index, storage);
|
||||
case 7:
|
||||
return new ArrayDouble.D7(index, storage);
|
||||
return new D7(index, storage);
|
||||
default:
|
||||
return new ArrayDouble(index, storage);
|
||||
}
|
||||
@ -64,21 +64,21 @@ public class ArrayFloat extends Array {
|
||||
static ArrayFloat factory(Index index, float[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayFloat.D0(index, storage);
|
||||
return new D0(index, storage);
|
||||
case 1:
|
||||
return new ArrayFloat.D1(index, storage);
|
||||
return new D1(index, storage);
|
||||
case 2:
|
||||
return new ArrayFloat.D2(index, storage);
|
||||
return new D2(index, storage);
|
||||
case 3:
|
||||
return new ArrayFloat.D3(index, storage);
|
||||
return new D3(index, storage);
|
||||
case 4:
|
||||
return new ArrayFloat.D4(index, storage);
|
||||
return new D4(index, storage);
|
||||
case 5:
|
||||
return new ArrayFloat.D5(index, storage);
|
||||
return new D5(index, storage);
|
||||
case 6:
|
||||
return new ArrayFloat.D6(index, storage);
|
||||
return new D6(index, storage);
|
||||
case 7:
|
||||
return new ArrayFloat.D7(index, storage);
|
||||
return new D7(index, storage);
|
||||
default:
|
||||
return new ArrayFloat(index, storage);
|
||||
}
|
||||
@ -64,21 +64,21 @@ public class ArrayInt extends Array {
|
||||
static ArrayInt factory(Index index, boolean isUnsigned, int[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayInt.D0(index, isUnsigned, storage);
|
||||
return new D0(index, isUnsigned, storage);
|
||||
case 1:
|
||||
return new ArrayInt.D1(index, isUnsigned, storage);
|
||||
return new D1(index, isUnsigned, storage);
|
||||
case 2:
|
||||
return new ArrayInt.D2(index, isUnsigned, storage);
|
||||
return new D2(index, isUnsigned, storage);
|
||||
case 3:
|
||||
return new ArrayInt.D3(index, isUnsigned, storage);
|
||||
return new D3(index, isUnsigned, storage);
|
||||
case 4:
|
||||
return new ArrayInt.D4(index, isUnsigned, storage);
|
||||
return new D4(index, isUnsigned, storage);
|
||||
case 5:
|
||||
return new ArrayInt.D5(index, isUnsigned, storage);
|
||||
return new D5(index, isUnsigned, storage);
|
||||
case 6:
|
||||
return new ArrayInt.D6(index, isUnsigned, storage);
|
||||
return new D6(index, isUnsigned, storage);
|
||||
case 7:
|
||||
return new ArrayInt.D7(index, isUnsigned, storage);
|
||||
return new D7(index, isUnsigned, storage);
|
||||
default:
|
||||
return new ArrayInt(index, isUnsigned, storage);
|
||||
}
|
||||
@ -65,21 +65,21 @@ public class ArrayLong extends Array {
|
||||
static ArrayLong factory(Index index, boolean isUnsigned, long[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayLong.D0(index, isUnsigned, storage);
|
||||
return new D0(index, isUnsigned, storage);
|
||||
case 1:
|
||||
return new ArrayLong.D1(index, isUnsigned, storage);
|
||||
return new D1(index, isUnsigned, storage);
|
||||
case 2:
|
||||
return new ArrayLong.D2(index, isUnsigned, storage);
|
||||
return new D2(index, isUnsigned, storage);
|
||||
case 3:
|
||||
return new ArrayLong.D3(index, isUnsigned, storage);
|
||||
return new D3(index, isUnsigned, storage);
|
||||
case 4:
|
||||
return new ArrayLong.D4(index, isUnsigned, storage);
|
||||
return new D4(index, isUnsigned, storage);
|
||||
case 5:
|
||||
return new ArrayLong.D5(index, isUnsigned, storage);
|
||||
return new D5(index, isUnsigned, storage);
|
||||
case 6:
|
||||
return new ArrayLong.D6(index, isUnsigned, storage);
|
||||
return new D6(index, isUnsigned, storage);
|
||||
case 7:
|
||||
return new ArrayLong.D7(index, isUnsigned, storage);
|
||||
return new D7(index, isUnsigned, storage);
|
||||
default:
|
||||
return new ArrayLong(index, isUnsigned, storage);
|
||||
}
|
||||
@ -60,21 +60,21 @@ public class ArrayObject extends Array {
|
||||
*/
|
||||
static ArrayObject factory(DataType dtype, Class elemType, boolean isVlen, Index index, Object[] storage) {
|
||||
if (index instanceof Index0D) {
|
||||
return new ArrayObject.D0(dtype, elemType, isVlen, index, storage);
|
||||
return new D0(dtype, elemType, isVlen, index, storage);
|
||||
} else if (index instanceof Index1D) {
|
||||
return new ArrayObject.D1(dtype, elemType, isVlen, index, storage);
|
||||
return new D1(dtype, elemType, isVlen, index, storage);
|
||||
} else if (index instanceof Index2D) {
|
||||
return new ArrayObject.D2(dtype, elemType, isVlen, index, storage);
|
||||
return new D2(dtype, elemType, isVlen, index, storage);
|
||||
} else if (index instanceof Index3D) {
|
||||
return new ArrayObject.D3(dtype, elemType, isVlen, index, storage);
|
||||
return new D3(dtype, elemType, isVlen, index, storage);
|
||||
} else if (index instanceof Index4D) {
|
||||
return new ArrayObject.D4(dtype, elemType, isVlen, index, storage);
|
||||
return new D4(dtype, elemType, isVlen, index, storage);
|
||||
} else if (index instanceof Index5D) {
|
||||
return new ArrayObject.D5(dtype, elemType, isVlen, index, storage);
|
||||
return new D5(dtype, elemType, isVlen, index, storage);
|
||||
} else if (index instanceof Index6D) {
|
||||
return new ArrayObject.D6(dtype, elemType, isVlen, index, storage);
|
||||
return new D6(dtype, elemType, isVlen, index, storage);
|
||||
} else if (index instanceof Index7D) {
|
||||
return new ArrayObject.D7(dtype, elemType, isVlen, index, storage);
|
||||
return new D7(dtype, elemType, isVlen, index, storage);
|
||||
} else {
|
||||
return new ArrayObject(dtype, elemType, isVlen, index, storage);
|
||||
}
|
||||
@ -138,7 +138,7 @@ public class ArrayObject extends Array {
|
||||
* create new Array with given indexImpl and the same backing store
|
||||
*/
|
||||
protected Array createView(Index index) {
|
||||
return ArrayObject.factory(elementType, index, storage);
|
||||
return factory(elementType, index, storage);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.util.Indent;
|
||||
import org.meteoinfo.ndarray.util.Indent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@ -122,7 +122,7 @@ public class ArraySequence extends ArrayStructureBak {
|
||||
StructureMembers membersw = new StructureMembers(proxym.getStructureMembers()); // no data arrays get propagated
|
||||
result = new ArrayStructureW(membersw, rshape);
|
||||
} else {
|
||||
result = Array.factory(dataType.getPrimitiveClassType(), rshape);
|
||||
result = factory(dataType.getPrimitiveClassType(), rshape);
|
||||
}
|
||||
|
||||
StructureDataIterator sdataIter = getStructureDataIterator();
|
||||
@ -357,7 +357,7 @@ public class ArraySequence extends ArrayStructureBak {
|
||||
}
|
||||
// create an array to hold the result
|
||||
rshape[0] = count;
|
||||
return Array.factory(dataType.getPrimitiveClassType(), rshape, dataArray);
|
||||
return factory(dataType.getPrimitiveClassType(), rshape, dataArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -369,8 +369,8 @@ public class ArraySequence extends ArrayStructureBak {
|
||||
public void showInternal(Formatter f, Indent indent) {
|
||||
super.showInternal(f, indent);
|
||||
f.format("%sStructureDataIterator Class=%s hash=0x%x%n", indent, iter.getClass().getName(), iter.hashCode());
|
||||
if (iter instanceof ArrayStructureBak.ArrayStructureIterator) {
|
||||
ArrayStructureBak.ArrayStructureIterator ii = (ArrayStructureBak.ArrayStructureIterator) iter;
|
||||
if (iter instanceof ArrayStructureIterator) {
|
||||
ArrayStructureIterator ii = (ArrayStructureIterator) iter;
|
||||
ii.getArrayStructure().showInternal(f, indent.incr());
|
||||
indent.decr();
|
||||
}
|
||||
@ -64,7 +64,7 @@ public class ArraySequenceNested extends ArrayStructureBak {
|
||||
}
|
||||
|
||||
// not sure how this is used
|
||||
protected StructureData makeStructureData( ArrayStructureBak as, int index) {
|
||||
protected StructureData makeStructureData(ArrayStructureBak as, int index) {
|
||||
return new StructureDataA( as, index);
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ public class ArraySequenceNested extends ArrayStructureBak {
|
||||
System.arraycopy(mShape, 0, shape, 1, mShape.length);
|
||||
|
||||
// LOOK not doing nested structures
|
||||
Array data = Array.factory(m.getDataType(), shape);
|
||||
Array data = factory(m.getDataType(), shape);
|
||||
m.setDataArray(data);
|
||||
}
|
||||
}
|
||||
@ -63,21 +63,21 @@ public class ArrayShort extends Array {
|
||||
static ArrayShort factory(Index index, boolean isUnsigned, short[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayShort.D0(index, isUnsigned, storage);
|
||||
return new D0(index, isUnsigned, storage);
|
||||
case 1:
|
||||
return new ArrayShort.D1(index, isUnsigned, storage);
|
||||
return new D1(index, isUnsigned, storage);
|
||||
case 2:
|
||||
return new ArrayShort.D2(index, isUnsigned, storage);
|
||||
return new D2(index, isUnsigned, storage);
|
||||
case 3:
|
||||
return new ArrayShort.D3(index, isUnsigned, storage);
|
||||
return new D3(index, isUnsigned, storage);
|
||||
case 4:
|
||||
return new ArrayShort.D4(index, isUnsigned, storage);
|
||||
return new D4(index, isUnsigned, storage);
|
||||
case 5:
|
||||
return new ArrayShort.D5(index, isUnsigned, storage);
|
||||
return new D5(index, isUnsigned, storage);
|
||||
case 6:
|
||||
return new ArrayShort.D6(index, isUnsigned, storage);
|
||||
return new D6(index, isUnsigned, storage);
|
||||
case 7:
|
||||
return new ArrayShort.D7(index, isUnsigned, storage);
|
||||
return new D7(index, isUnsigned, storage);
|
||||
default:
|
||||
return new ArrayShort(index, isUnsigned, storage);
|
||||
}
|
||||
@ -61,21 +61,21 @@ public class ArrayString extends Array {
|
||||
static ArrayString factory(Index index, String[] storage) {
|
||||
switch (index.getRank()) {
|
||||
case 0:
|
||||
return new ArrayString.D0(index, storage);
|
||||
return new D0(index, storage);
|
||||
case 1:
|
||||
return new ArrayString.D1(index, storage);
|
||||
return new D1(index, storage);
|
||||
case 2:
|
||||
return new ArrayString.D2(index, storage);
|
||||
return new D2(index, storage);
|
||||
case 3:
|
||||
return new ArrayString.D3(index, storage);
|
||||
return new D3(index, storage);
|
||||
case 4:
|
||||
return new ArrayString.D4(index, storage);
|
||||
return new D4(index, storage);
|
||||
case 5:
|
||||
return new ArrayString.D5(index, storage);
|
||||
return new D5(index, storage);
|
||||
case 6:
|
||||
return new ArrayString.D6(index, storage);
|
||||
return new D6(index, storage);
|
||||
case 7:
|
||||
return new ArrayString.D7(index, storage);
|
||||
return new D7(index, storage);
|
||||
default:
|
||||
return new ArrayString(index, storage);
|
||||
}
|
||||
@ -32,14 +32,14 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.ndarry.constants.CDM;
|
||||
import org.meteoinfo.util.Indent;
|
||||
import org.meteoinfo.ndarray.constants.CDM;
|
||||
import org.meteoinfo.ndarray.util.Indent;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Formatter;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Concrete implementation of ArrayStructure, data storage is in a ByteBuffer, which is converted to member data on the fly.
|
||||
@ -32,13 +32,13 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.util.Indent;
|
||||
import org.meteoinfo.ndarray.util.Indent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Formatter;
|
||||
import java.util.List;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/**
|
||||
* Superclass for implementations of Array of StructureData.
|
||||
@ -319,35 +319,35 @@ public abstract class ArrayStructureBak extends Array {
|
||||
|
||||
if (dataType == DataType.DOUBLE) {
|
||||
double[] pa = getJavaArrayDouble(recno, m);
|
||||
return Array.factory(double.class, m.getShape(), pa);
|
||||
return factory(double.class, m.getShape(), pa);
|
||||
|
||||
} else if (dataType == DataType.FLOAT) {
|
||||
float[] pa = getJavaArrayFloat(recno, m);
|
||||
return Array.factory(float.class, m.getShape(), pa);
|
||||
return factory(float.class, m.getShape(), pa);
|
||||
|
||||
} else if ((dataType == DataType.BYTE) || (dataType == DataType.ENUM1)) {
|
||||
byte[] pa = getJavaArrayByte(recno, m);
|
||||
return Array.factory(byte.class, m.getShape(), pa);
|
||||
return factory(byte.class, m.getShape(), pa);
|
||||
|
||||
} else if ((dataType == DataType.SHORT) || (dataType == DataType.ENUM2)) {
|
||||
short[] pa = getJavaArrayShort(recno, m);
|
||||
return Array.factory(short.class, m.getShape(), pa);
|
||||
return factory(short.class, m.getShape(), pa);
|
||||
|
||||
} else if ((dataType == DataType.INT) || (dataType == DataType.ENUM4)) {
|
||||
int[] pa = getJavaArrayInt(recno, m);
|
||||
return Array.factory(int.class, m.getShape(), pa);
|
||||
return factory(int.class, m.getShape(), pa);
|
||||
|
||||
} else if (dataType == DataType.LONG) {
|
||||
long[] pa = getJavaArrayLong(recno, m);
|
||||
return Array.factory(long.class, m.getShape(), pa);
|
||||
return factory(long.class, m.getShape(), pa);
|
||||
|
||||
} else if (dataType == DataType.CHAR) {
|
||||
char[] pa = getJavaArrayChar(recno, m);
|
||||
return Array.factory(char.class, m.getShape(), pa);
|
||||
return factory(char.class, m.getShape(), pa);
|
||||
|
||||
} else if (dataType == DataType.STRING) {
|
||||
String[] pa = getJavaArrayString(recno, m);
|
||||
return Array.factory(String.class, m.getShape(), pa);
|
||||
return factory(String.class, m.getShape(), pa);
|
||||
|
||||
} else if (dataType == DataType.STRUCTURE) {
|
||||
return getArrayStructure(recno, m);
|
||||
@ -382,7 +382,7 @@ public abstract class ArrayStructureBak extends Array {
|
||||
*
|
||||
* @param m get data from this StructureMembers.Member.
|
||||
* @return Array values.
|
||||
* @throws java.io.IOException on read error (only happens for Sequences, otherwise data is already read)
|
||||
* @throws IOException on read error (only happens for Sequences, otherwise data is already read)
|
||||
*/
|
||||
public Array extractMemberArray(StructureMembers.Member m) throws IOException {
|
||||
if (m.getDataArray() != null)
|
||||
@ -421,7 +421,7 @@ public abstract class ArrayStructureBak extends Array {
|
||||
result = new ArrayObject(dataType, ByteBuffer.class, false, rshape);
|
||||
|
||||
} else {
|
||||
result = Array.factory(dataType.getPrimitiveClassType(), rshape);
|
||||
result = factory(dataType.getPrimitiveClassType(), rshape);
|
||||
}
|
||||
|
||||
IndexIterator resultIter = result.getIndexIterator();
|
||||
@ -33,8 +33,8 @@
|
||||
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* An ArrayStructure compose of other ArrayStructures.
|
||||
@ -210,7 +210,7 @@ public class ArrayStructureMA extends ArrayStructureBak {
|
||||
* Turn any ArrayStructure into a ArrayStructureMA
|
||||
* @param from copy from here. If from is a ArrayStructureMA, return it.
|
||||
* @return equivilent ArrayStructureMA
|
||||
* @throws java.io.IOException on error reading a sequence
|
||||
* @throws IOException on error reading a sequence
|
||||
*/
|
||||
static public ArrayStructureMA factoryMA(ArrayStructureBak from) throws IOException {
|
||||
if (from instanceof ArrayStructureMA)
|
||||
@ -32,8 +32,6 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.data.meteodata.arl.DataLabel;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.time.LocalDateTime;
|
||||
@ -13,9 +13,10 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.ndarray.util.BigDecimalUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.meteoinfo.global.util.BigDecimalUtil;
|
||||
|
||||
/**
|
||||
* Template
|
||||
@ -563,9 +564,9 @@ public class Dimension {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.reverse) {
|
||||
/*if (this.reverse) {
|
||||
idx = this.getLength() - idx - 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
return idx;
|
||||
}
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.util.Misc;
|
||||
import org.meteoinfo.ndarray.util.Misc;
|
||||
|
||||
/**
|
||||
* Element by element algebra on Arrays
|
||||
@ -481,7 +481,7 @@ public class MAMath {
|
||||
* @param a the array.
|
||||
* @return MinMax
|
||||
*/
|
||||
public static MAMath.MinMax getMinMax(Array a) {
|
||||
public static MinMax getMinMax(Array a) {
|
||||
IndexIterator iter = a.getIndexIterator();
|
||||
double max = -Double.MAX_VALUE;
|
||||
double min = Double.MAX_VALUE;
|
||||
@ -496,7 +496,7 @@ public class MAMath {
|
||||
return new MinMax(min, max);
|
||||
}
|
||||
|
||||
public static MAMath.MinMax getMinMaxSkipMissingData(Array a, IsMissingEvaluator eval) {
|
||||
public static MinMax getMinMaxSkipMissingData(Array a, IsMissingEvaluator eval) {
|
||||
if (!eval.hasMissing())
|
||||
return MAMath.getMinMax(a);
|
||||
|
||||
@ -512,7 +512,7 @@ public class MAMath {
|
||||
if (val < min)
|
||||
min = val;
|
||||
}
|
||||
return new MAMath.MinMax(min, max);
|
||||
return new MinMax(min, max);
|
||||
}
|
||||
|
||||
|
||||
@ -538,7 +538,7 @@ public class MAMath {
|
||||
return max;
|
||||
}
|
||||
|
||||
public static MAMath.MinMax getMinMaxSkipMissingData(Array a, double missingValue) {
|
||||
public static MinMax getMinMaxSkipMissingData(Array a, double missingValue) {
|
||||
IndexIterator iter = a.getIndexIterator();
|
||||
double max = -Double.MAX_VALUE;
|
||||
double min = Double.MAX_VALUE;
|
||||
@ -648,8 +648,8 @@ public class MAMath {
|
||||
* @param isUnsigned use signed or unsigned packed values
|
||||
* @return ScaleOffset, calculated as above.
|
||||
*/
|
||||
public static MAMath.ScaleOffset calcScaleOffsetSkipMissingData(Array a, double missingValue, int nbits, boolean isUnsigned) {
|
||||
MAMath.MinMax minmax = getMinMaxSkipMissingData(a, missingValue);
|
||||
public static ScaleOffset calcScaleOffsetSkipMissingData(Array a, double missingValue, int nbits, boolean isUnsigned) {
|
||||
MinMax minmax = getMinMaxSkipMissingData(a, missingValue);
|
||||
|
||||
if (isUnsigned) {
|
||||
long size = (1L << nbits) - 1;
|
||||
@ -666,7 +666,7 @@ public class MAMath {
|
||||
}
|
||||
|
||||
public static Array convert2packed(Array unpacked, double missingValue, int nbits, boolean isUnsigned, DataType packedType) {
|
||||
MAMath.ScaleOffset scaleOffset = calcScaleOffsetSkipMissingData(unpacked, missingValue, nbits, isUnsigned);
|
||||
ScaleOffset scaleOffset = calcScaleOffsetSkipMissingData(unpacked, missingValue, nbits, isUnsigned);
|
||||
Array result = Array.factory(packedType, unpacked.getShape());
|
||||
IndexIterator riter = result.getIndexIterator();
|
||||
while (unpacked.hasNext()) {
|
||||
@ -34,9 +34,8 @@
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
@ -33,7 +33,10 @@
|
||||
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
* A section of multidimensional array indices.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.util.Indent;
|
||||
import org.meteoinfo.ndarray.util.Indent;
|
||||
|
||||
import java.util.Formatter;
|
||||
import java.util.List;
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.util.Indent;
|
||||
import org.meteoinfo.ndarray.util.Indent;
|
||||
|
||||
import java.util.Formatter;
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A composite of other StructureData.
|
||||
@ -33,10 +33,11 @@
|
||||
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.ndarray.util.Converter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import org.meteoinfo.util.Converter;
|
||||
|
||||
/**
|
||||
* Make a deep copy of an existing StructureData, so that all the data is contained in this object
|
||||
@ -56,7 +56,7 @@ public interface StructureDataIterator {
|
||||
* You must always call this before calling next().
|
||||
*
|
||||
* @return true if more records are available
|
||||
* @throws java.io.IOException on read error
|
||||
* @throws IOException on read error
|
||||
*/
|
||||
public boolean hasNext() throws IOException;
|
||||
|
||||
@ -64,7 +64,7 @@ public interface StructureDataIterator {
|
||||
* Get the next StructureData in the iteration.
|
||||
*
|
||||
* @return next StructureData record.
|
||||
* @throws java.io.IOException on read error
|
||||
* @throws IOException on read error
|
||||
*/
|
||||
public StructureData next() throws IOException;
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.util.Indent;
|
||||
import org.meteoinfo.ndarray.util.Indent;
|
||||
|
||||
import java.util.Formatter;
|
||||
import java.util.HashMap;
|
||||
@ -47,7 +47,7 @@ import java.util.Map;
|
||||
*/
|
||||
|
||||
public class StructureDataW extends StructureData {
|
||||
protected final Map<StructureMembers.Member,Array> memberData;
|
||||
protected final Map<StructureMembers.Member, Array> memberData;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
package org.meteoinfo.ndarray;
|
||||
|
||||
import org.meteoinfo.util.Indent;
|
||||
import org.meteoinfo.ndarray.util.Indent;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -147,7 +147,7 @@ public class StructureMembers {
|
||||
*
|
||||
* @return the list of Member objects.
|
||||
*/
|
||||
public java.util.List<Member> getMembers() {
|
||||
public List<Member> getMembers() {
|
||||
return members;
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ public class StructureMembers {
|
||||
*
|
||||
* @return List of type String.
|
||||
*/
|
||||
public java.util.List<String> getMemberNames() {
|
||||
public List<String> getMemberNames() {
|
||||
List<String> memberNames = new ArrayList<>();
|
||||
for (Member m : members) {
|
||||
memberNames.add(m.getName());
|
||||
@ -411,7 +411,7 @@ public class StructureMembers {
|
||||
if (members != null) {
|
||||
indent.incr();
|
||||
f.format("%n%sNested members %s%n", indent, members.getName());
|
||||
for (StructureMembers.Member m : members.getMembers())
|
||||
for (Member m : members.getMembers())
|
||||
m.showInternal(f, indent);
|
||||
indent.decr();
|
||||
}
|
||||
@ -31,7 +31,7 @@
|
||||
* WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.meteoinfo.ndarry.constants;
|
||||
package org.meteoinfo.ndarray.constants;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user