Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EBVCubeVisualizerPlugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
no67wuwu
EBVCubeVisualizerPlugin
Commits
e4326e49
Commit
e4326e49
authored
2 years ago
by
Emmanuel Heriberto Oceguera Conchas
Browse files
Options
Downloads
Patches
Plain Diff
Class for the mask and funtionality of the Plugin
parent
f910de5b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
netCDF_visualizer_funtionality.py
+71
-0
71 additions, 0 deletions
netCDF_visualizer_funtionality.py
with
71 additions
and
0 deletions
netCDF_visualizer_funtionality.py
+
71
−
0
View file @
e4326e49
'''
/****************************************************************************************
* This is a python script for visualizing netCDF files using PyQt5 and matplotlib
*
* The script is based on the QGIS plugin template by Gispo
*
*
****************************************************************************************/
/****************************************************************************************
* The program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* at your option) any later version.
*
* The script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see http://www.gnu.org/licenses/.
****************************************************************************************/
'''
#we import the impotant libraries and modules
#always import the libraries and modules at the top of the code
from
tkinter
import
Widget
from
PyQt5.Qtcore
import
*
from
PyQt5.QtGui
import
*
from
PyQt5.QtWidgets
import
*
from
pyQt5
import
uic
#we want to work with the os module
import
os
#to import general tools from QGIS we need the qgis.core module
from
qgis.core
import
*
#we want to work with the numpy module
import
numpy
as
np
#for loading the netCDF files we need the netCDF4 module
import
netCDF4
as
nc
from
netCDF4
import
Dataset
#we create the path to the ui file
#Path to the Ordner where the ui file is
ncPath
=
os
.
path
.
dirname
(
__file__
)
#the comand dirname gives the path to the directory where the file is
#path to the ui file
uiPath
=
os
.
path
.
join
(
ncPath
,
'
netCDF_visualizer.ui
'
)
#two class
# WIDEGT is a class for the GUI
# BASE is a PyQt5 class to insatalize the GUI
WIDGET
,
BASE
=
uic
.
loadUiType
(
uiPath
)
class
maskAndFuntionality
(
WIDGET
,
BASE
):
def
__init__
(
self
,
iface
):
#self = GUI/mask
QDialog
.
__init__
(
self
,
iface
.
mainWindow
())
self
.
setuoUi
(
self
)
#self is a GUI
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment