mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
support epsg projection code
This commit is contained in:
parent
513881ac7d
commit
11c94e8d03
@ -69,7 +69,7 @@ import java.util.zip.ZipInputStream;
|
||||
public static String getVersion() {
|
||||
String version = GlobalUtil.class.getPackage().getImplementationVersion();
|
||||
if (version == null || version.equals("")) {
|
||||
version = "4.0.3";
|
||||
version = "4.0.4";
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
@ -728,7 +728,7 @@ public class GeoTiff {
|
||||
gData.yArray = Y;
|
||||
|
||||
//Get missing value
|
||||
IFDEntry noDataTag = findTag(Tag.GDALNoData);
|
||||
IFDEntry noDataTag = findTag(Tag.GDALNoDataTag);
|
||||
if (noDataTag != null) {
|
||||
double missingValue = Double.parseDouble(noDataTag.valueS);
|
||||
gData.missingValue = missingValue;
|
||||
@ -1360,6 +1360,12 @@ public class GeoTiff {
|
||||
}
|
||||
|
||||
r = ArrayMath.flip(r, 0);
|
||||
IFDEntry noDataTag = findTag(Tag.GDALNoDataTag);
|
||||
if (noDataTag != null) {
|
||||
double missingValue = Double.parseDouble(noDataTag.valueS);
|
||||
ArrayMath.replaceValue(r, missingValue, Double.NaN);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -1679,6 +1685,12 @@ public class GeoTiff {
|
||||
}
|
||||
|
||||
r = ArrayMath.flip(r, 0);
|
||||
IFDEntry noDataTag = findTag(Tag.GDALNoDataTag);
|
||||
if (noDataTag != null) {
|
||||
double missingValue = Double.parseDouble(noDataTag.valueS);
|
||||
ArrayMath.replaceValue(r, missingValue, Double.NaN);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ import java.util.HashMap;
|
||||
public static final Tag GeoKeyDirectoryTag = new Tag("GeoKeyDirectoryTag", 34735);
|
||||
public static final Tag GeoDoubleParamsTag = new Tag("GeoDoubleParamsTag", 34736);
|
||||
public static final Tag GeoAsciiParamsTag = new Tag("GeoAsciiParamsTag", 34737);
|
||||
public static final Tag GDALNoData = new Tag("GDALNoDataTag", 42113);
|
||||
public static final Tag GDALNoDataTag = new Tag("GDALNoDataTag", 42113);
|
||||
private String name;
|
||||
private int code;
|
||||
// </editor-fold>
|
||||
|
||||
@ -1,30 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<MeteoInfo File="milconfig.xml" Type="configurefile">
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\io\micaps">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\wind"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\grib"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\netcdf"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\zarr"/>
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\io\geotiff">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\satellite\calipso"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\burf"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\satellite"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\satellite\ascat"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\image"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math\ndimage"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\micaps"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\zarr"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\plot"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\funny"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\geotiff"/>
|
||||
</Path>
|
||||
<File>
|
||||
<OpenedFiles>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\satellite\ascat\ascat_1.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\micaps\micaps_4_12.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\bird_1.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\geotiff\geotif_KX10.py"/>
|
||||
</OpenedFiles>
|
||||
<RecentFiles>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\satellite\ascat\ascat_1.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\io\micaps\micaps_4_12.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\funny\bird_1.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\io\geotiff\geotif_KX10.py"/>
|
||||
</RecentFiles>
|
||||
</File>
|
||||
<Font>
|
||||
@ -32,5 +34,5 @@
|
||||
</Font>
|
||||
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
|
||||
<Figure DoubleBuffering="true"/>
|
||||
<Startup MainFormLocation="-6,-6" MainFormSize="1292,764"/>
|
||||
<Startup MainFormLocation="-6,0" MainFormSize="1339,808"/>
|
||||
</MeteoInfo>
|
||||
|
||||
Binary file not shown.
@ -1433,6 +1433,8 @@ class Axes(object):
|
||||
if ydata.ndim == 1:
|
||||
graphics = Line2D(xdata, ydata, legend=lines[0], curve=iscurve)
|
||||
else:
|
||||
if kwargs.has_key('color'):
|
||||
kwargs['colors'] = kwargs['color']
|
||||
if not kwargs.has_key('cmap'):
|
||||
kwargs['cmap'] = 'matlab_jet'
|
||||
graphics = LineCollection(None, xydata=[xdata, ydata], **kwargs)
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<proj4j.version>1.4.1</proj4j.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@ -25,7 +26,12 @@
|
||||
<dependency>
|
||||
<groupId>org.locationtech.proj4j</groupId>
|
||||
<artifactId>proj4j</artifactId>
|
||||
<version>1.3.0</version>
|
||||
<version>${proj4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.locationtech.proj4j</groupId>
|
||||
<artifactId>proj4j-epsg</artifactId>
|
||||
<version>${proj4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.geographiclib</groupId>
|
||||
|
||||
@ -984,6 +984,10 @@ public class ProjectionUtil {
|
||||
for (Graphic aGraphic : ((GraphicCollection) graphic).getGraphics()) {
|
||||
List<? extends Shape> shapes = projectClipShape(aGraphic.getShape(), fromProj, toProj);
|
||||
if (shapes != null && shapes.size() > 0) {
|
||||
if (shapes.get(0).getExtent() == null) {
|
||||
//System.out.println(shapes.get(0).toString());
|
||||
continue;
|
||||
}
|
||||
aGraphic.setShape(shapes.get(0));
|
||||
graphics.add(aGraphic);
|
||||
}
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -35,7 +35,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<revision>4.0.3</revision>
|
||||
<revision>4.0.4</revision>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<maven.compiler.release>8</maven.compiler.release>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user