mirror of
https://github.com/meteoinfo/MeteoInfo.git
synced 2025-12-08 20:36:05 +00:00
to version 3.3.4
This commit is contained in:
parent
dba1f37261
commit
b4287b66dc
@ -11,12 +11,15 @@ import org.meteoinfo.chart.ChartText3D;
|
||||
import org.meteoinfo.chart.axis.Axis;
|
||||
import org.meteoinfo.chart.graphic.GraphicCollection3D;
|
||||
import org.meteoinfo.chart.graphic.SurfaceGraphics;
|
||||
import org.meteoinfo.chart.jogl.tessellator.TessPolygon;
|
||||
import org.meteoinfo.chart.plot.GridLine;
|
||||
import org.meteoinfo.common.*;
|
||||
import org.meteoinfo.geo.legend.LegendManage;
|
||||
import org.meteoinfo.geometry.graphic.Graphic;
|
||||
import org.meteoinfo.geometry.legend.LegendScheme;
|
||||
import org.meteoinfo.geometry.legend.PolygonBreak;
|
||||
import org.meteoinfo.geometry.shape.PolygonZ;
|
||||
import org.meteoinfo.geometry.shape.PolygonZShape;
|
||||
import org.meteoinfo.geometry.shape.Shape;
|
||||
import org.meteoinfo.geometry.shape.ShapeTypes;
|
||||
import org.meteoinfo.image.ImageUtil;
|
||||
@ -383,5 +386,10 @@ public class EarthPlot3D extends Plot3DGL {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawPolygonShape(GL2 gl, Graphic graphic) {
|
||||
super.drawPolygonShape(gl, graphic);
|
||||
}
|
||||
|
||||
// </editor-fold>
|
||||
}
|
||||
|
||||
@ -2219,7 +2219,7 @@ public class Plot3DGL extends Plot implements GLEventListener {
|
||||
}
|
||||
}
|
||||
|
||||
private void drawGraphic(GL2 gl, Graphic graphic) {
|
||||
protected void drawGraphic(GL2 gl, Graphic graphic) {
|
||||
Shape shape = graphic.getGraphicN(0).getShape();
|
||||
switch (shape.getShapeType()) {
|
||||
case POINT:
|
||||
@ -2763,7 +2763,7 @@ public class Plot3DGL extends Plot implements GLEventListener {
|
||||
}
|
||||
}
|
||||
|
||||
private void drawPolygonShape(GL2 gl, Graphic graphic) {
|
||||
protected void drawPolygonShape(GL2 gl, Graphic graphic) {
|
||||
boolean isDraw = true;
|
||||
if (this.clipPlane)
|
||||
isDraw = drawExtent.intersects(graphic.getExtent());
|
||||
@ -2801,16 +2801,18 @@ public class Plot3DGL extends Plot implements GLEventListener {
|
||||
float[] rgba = aPGB.getColor().getRGBComponents(null);
|
||||
gl.glColor4f(rgba[0], rgba[1], rgba[2], rgba[3]);
|
||||
|
||||
try {
|
||||
for (Primitive primitive : tessPolygon.getPrimitives()) {
|
||||
gl.glBegin(primitive.type);
|
||||
for (PointZ p : primitive.vertices) {
|
||||
gl.glVertex3fv(transform.transform((float) p.X, (float) p.Y, (float) p.Z), 0);
|
||||
if (tessPolygon.getPrimitives() != null) {
|
||||
try {
|
||||
for (Primitive primitive : tessPolygon.getPrimitives()) {
|
||||
gl.glBegin(primitive.type);
|
||||
for (PointZ p : primitive.vertices) {
|
||||
gl.glVertex3fv(transform.transform((float) p.X, (float) p.Y, (float) p.Z), 0);
|
||||
}
|
||||
gl.glEnd();
|
||||
}
|
||||
gl.glEnd();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (aPGB.isDrawOutline()) {
|
||||
|
||||
@ -121,6 +121,16 @@ public class SphericalTransform {
|
||||
primitive.vertices.set(k, transform(primitive.vertices.get(k)));
|
||||
}
|
||||
}
|
||||
List<PointZ> outLine = (List<PointZ>) tessPolygon.getOutLine();
|
||||
for (int k = 0; k < outLine.size(); k++) {
|
||||
outLine.set(k, transform(outLine.get(k)));
|
||||
}
|
||||
for (int k = 0; k < tessPolygon.getHoleLineNumber(); k++) {
|
||||
List<PointZ> holeLine = (List<PointZ>) tessPolygon.getHoleLine(k);
|
||||
for (int l = 0; l < holeLine.size(); l++) {
|
||||
holeLine.set(l, transform(holeLine.get(l)));
|
||||
}
|
||||
}
|
||||
polygonZS.set(j, tessPolygon);
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
package org.meteoinfo.chart.jogl.tessellator;
|
||||
|
||||
import org.meteoinfo.common.Extent;
|
||||
import org.meteoinfo.geometry.geoprocess.ClipLine;
|
||||
import org.meteoinfo.geometry.geoprocess.GeoComputation;
|
||||
import org.meteoinfo.geometry.shape.PolygonZ;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SurfaceTessPolygon extends TessPolygon {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param primitives Primitive list
|
||||
*/
|
||||
public SurfaceTessPolygon(List<Primitive> primitives) {
|
||||
super(primitives);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param polygonZ Input PolygonZ
|
||||
*/
|
||||
public SurfaceTessPolygon(PolygonZ polygon) {
|
||||
this.setOutLine(polygon.getOutLine());
|
||||
this.setHoleLines(polygon.getHoleLines());
|
||||
this.setExtent(polygon.getExtent());
|
||||
|
||||
PrimitiveTessellator tessellator = new PrimitiveTessellator();
|
||||
|
||||
List<PolygonZ> polygonZS = new ArrayList<>();
|
||||
Extent extent = polygon.getExtent();
|
||||
if (extent.getWidth() > 1) {
|
||||
for (double min = extent.minX + 1; min < extent.maxX; min+=1) {
|
||||
ClipLine clipLine = new ClipLine();
|
||||
clipLine.setLongitude(true);
|
||||
clipLine.setValue(min);
|
||||
clipLine.setLeftOrTop(true);
|
||||
//polygonZS.addAll((List<PolygonZ>)GeoComputation.clipPolygon(polygon, clipLine));
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
this.primitives = tessellator.getPrimitives(polygon);
|
||||
} catch (PrimitiveTessellator.TesselationException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2,10 +2,18 @@ package org.meteoinfo.chart.jogl.tessellator;
|
||||
|
||||
import org.meteoinfo.geometry.shape.PolygonZ;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TessPolygon extends PolygonZ {
|
||||
private List<Primitive> primitives;
|
||||
protected List<Primitive> primitives;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public TessPolygon() {
|
||||
this.primitives = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@ -65,7 +65,7 @@ import java.util.zip.ZipInputStream;
|
||||
public static String getVersion(){
|
||||
String version = GlobalUtil.class.getPackage().getImplementationVersion();
|
||||
if (version == null || version.equals("")) {
|
||||
version = "3.3.3";
|
||||
version = "3.3.4";
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
@ -1528,7 +1528,7 @@ public class GeoComputation {
|
||||
return newPolygons;
|
||||
}
|
||||
|
||||
private static List<Polygon> clipPolygon(Polygon inPolygon, Object clipObj) {
|
||||
public static List<Polygon> clipPolygon(Polygon inPolygon, Object clipObj) {
|
||||
List<Polygon> newPolygons = new ArrayList<>();
|
||||
List<Polyline> newPolylines = new ArrayList<>();
|
||||
List<PointD> aPList = (List<PointD>) inPolygon.getOutLine();
|
||||
|
||||
@ -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\meteo">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\data"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\wrf"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\isosurface"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\satellite"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\satellite\calipso"/>
|
||||
<Path OpenPath="D:\Working\MIScript\Jython\mis\hdf">
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo\calc"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\plot"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\geoshow"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\bar"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d_earth"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\meteo"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\topology"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\volume"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
|
||||
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\hdf"/>
|
||||
</Path>
|
||||
<File>
|
||||
<OpenedFiles>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\plot\traj_3d.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\meteo\hdivg_vint.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d_earth\contourf.py"/>
|
||||
<OpenedFile File="D:\Working\MIScript\Jython\mis\hdf\CloudSAT_Swath.py"/>
|
||||
</OpenedFiles>
|
||||
<RecentFiles>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\plot\traj_3d.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\meteo\hdivg_vint.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d_earth\contourf.py"/>
|
||||
<RecentFile File="D:\Working\MIScript\Jython\mis\hdf\CloudSAT_Swath.py"/>
|
||||
</RecentFiles>
|
||||
</File>
|
||||
<Font>
|
||||
@ -32,5 +34,5 @@
|
||||
</Font>
|
||||
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
|
||||
<Figure DoubleBuffering="true"/>
|
||||
<Startup MainFormLocation="-7,0" MainFormSize="1337,773"/>
|
||||
<Startup MainFormLocation="-7,-7" MainFormSize="1293,685"/>
|
||||
</MeteoInfo>
|
||||
|
||||
Binary file not shown.
@ -2378,7 +2378,10 @@ class Axes(object):
|
||||
elif X.ndim > 2:
|
||||
isrgb = True
|
||||
else:
|
||||
gdata = np.asgridarray(X)
|
||||
if n >= 3:
|
||||
gdata = np.asgridarray(X, xdata, ydata)
|
||||
else:
|
||||
gdata = np.asgridarray(X)
|
||||
args = args[1:]
|
||||
|
||||
extent = kwargs.pop('extent', extent)
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -33,7 +33,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<revision>3.3.3</revision>
|
||||
<revision>3.3.4</revision>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user