fix bug for MILayer class

This commit is contained in:
wyq 2021-10-29 11:19:02 +08:00
parent b94593f87a
commit 1c958cdac2
6 changed files with 16 additions and 14 deletions

View File

@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="milconfig.xml" Type="configurefile">
<Path OpenPath="D:\Working\MIScript\Jython\mis\chart">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\projection"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\chart\axes"/>
<Path OpenPath="D:\Working\MIScript\Jython\mis\common_math\interpolate">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\pie"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\polar"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\array"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
<RecentFolder Folder="D:\Temp\test\emission"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\netcdf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\error"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\plot"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\chart"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\traj"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math\interpolate"/>
</Path>
<File>
<OpenedFiles>
<OpenedFile File="D:\Working\MIScript\Jython\mis\toolbox\miml\deep_learning\classification\saturn.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf_sphere.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\error\errorbar_4.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\common_math\interpolate\griddata_kriging.py"/>
</OpenedFiles>
<RecentFiles>
<RecentFile File="D:\Working\MIScript\Jython\mis\toolbox\miml\deep_learning\classification\saturn.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf_sphere.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\error\errorbar_4.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\common_math\interpolate\griddata_kriging.py"/>
</RecentFiles>
</File>
<Font>
@ -34,5 +34,5 @@
</Font>
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
<Figure DoubleBuffering="true"/>
<Startup MainFormLocation="-7,-7" MainFormSize="1293,693"/>
<Startup MainFormLocation="-7,0" MainFormSize="1408,820"/>
</MeteoInfo>

View File

@ -35,10 +35,10 @@ def makeshapes(x, y, shape_type=None, z=None, m=None):
y = np.asarray(y)._array
if not z is None:
if m is None:
m = np.zeros(len(z))._array
m = np.zeros(len(z))
else:
m = np.asarray(m)._array
z = np.asarray(z)._array
m = np.asarray(m)
z = np.asarray(z)
if isinstance(shape_type, basestring):
try:
shape_type = ShapeTypes.valueOf(shape_type)

View File

@ -32,6 +32,10 @@ class MILayer(object):
print('shapetype must be specified!')
else:
shapetype = shapetype.upper()
if shapetype == 'LINE':
shapetype = 'POLYLINE'
elif shapetype == 'LINE_Z':
shapetype = 'POLYLINE_Z'
try:
type = ShapeTypes.valueOf(shapetype)
except:

View File

@ -429,7 +429,6 @@ public class FrmMain extends javax.swing.JFrame implements IApplication {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
cControl1 = new bibliothek.gui.dock.common.CControl();
jPanel_Toolbar = new javax.swing.JPanel();
jToolBar_Editor = new javax.swing.JToolBar();
jButton_NewFile = new javax.swing.JButton();
@ -1404,7 +1403,6 @@ public class FrmMain extends javax.swing.JFrame implements IApplication {
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private bibliothek.gui.dock.common.CControl cControl1;
private javax.swing.JButton jButton_CurrentFolder;
private javax.swing.JButton jButton_NewFile;
private javax.swing.JButton jButton_OpenFile;