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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
no67wuwu
EBVCubeVisualizerPlugin
Commits
6e14b012
Commit
6e14b012
authored
Nov 15, 2022
by
Emmanuel Oceguera Conchas
Browse files
Options
Downloads
Patches
Plain Diff
the icon has been added
parent
fe50f026
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
EBVCubeVisualizer_funtionality.py
+26
-18
26 additions, 18 deletions
EBVCubeVisualizer_funtionality.py
metadata.txt
+27
-1
27 additions, 1 deletion
metadata.txt
with
53 additions
and
19 deletions
EBVCubeVisualizer_funtionality.py
+
26
−
18
View file @
6e14b012
...
...
@@ -263,33 +263,36 @@ class maskAndFuntionality (BASE, WIDGET):
#when we click on the top level item we show the name of the file, title and the global attributes
if
self
.
tree_data
.
currentItem
().
parent
()
==
None
:
self
.
text_info
.
clear
()
self
.
text_info
.
append
(
"
File name:
"
+
ncFileName
)
self
.
text_info
.
append
(
"
Title:
"
+
ncFileTitle
)
self
.
text_info
.
append
(
"
Global attributes:
"
)
self
.
text_info
.
append
(
"
<b><font size=4>
"
+
"
File name:
"
+
ncFileName
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Title:
"
+
ncFileTitle
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Global attributes:
"
+
"
</font></b>
"
)
for
i
in
range
(
len
(
ncFileGlobalAttributes
)):
self
.
text_info
.
append
(
"
--
"
+
ncFileGlobalAttributes
[
i
]
+
"
:
"
+
str
(
ncFile
.
getncattr
(
ncFileGlobalAttributes
[
i
])))
self
.
text_info
.
append
(
"
<b>
"
+
ncFileGlobalAttributes
[
i
]
+
"
:
"
+
"
</b>
"
+
str
(
ncFile
.
getncattr
(
ncFileGlobalAttributes
[
i
])))
#when we click on a group we show the name of the group and the attributes of the group and if we click on a variable of the group we show the attributes of the variable
elif
self
.
tree_data
.
currentItem
().
parent
().
parent
()
==
None
:
self
.
text_info
.
clear
()
self
.
text_info
.
append
(
"
File name:
"
+
ncFileName
)
self
.
text_info
.
append
(
"
Title:
"
+
ncFileTitle
)
self
.
text_info
.
append
(
"
Group name:
"
+
self
.
tree_data
.
currentItem
().
text
(
0
))
self
.
text_info
.
append
(
"
Long name:
"
+
self
.
tree_data
.
currentItem
().
text
(
1
))
self
.
text_info
.
append
(
"
Attributes:
"
)
self
.
text_info
.
append
(
"
<b><font size=4>
"
+
"
File name:
"
+
ncFileName
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Title:
"
+
ncFileTitle
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Group name:
"
+
self
.
tree_data
.
currentItem
().
text
(
0
)
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Long name:
"
+
self
.
tree_data
.
currentItem
().
text
(
1
)
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Attributes:
"
+
"
</font></b>
"
)
for
i
in
range
(
len
(
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
ncattrs
())):
self
.
text_info
.
append
(
"
--
"
+
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
ncattrs
()[
i
]
+
"
:
"
+
str
(
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
getncattr
(
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
ncattrs
()[
i
])))
self
.
text_info
.
append
(
"
<b>
"
+
"
--
"
+
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
ncattrs
()[
i
]
+
"
:
"
+
"
</b>
"
+
str
(
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
getncattr
(
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
ncattrs
()[
i
])))
#when we click on a variable of the group and the attributes of the varibales
else
:
self
.
text_info
.
append
(
"
File name:
"
+
ncFileName
)
self
.
text_info
.
append
(
"
Title:
"
+
ncFileTitle
)
self
.
text_info
.
append
(
"
Variable name:
"
+
self
.
tree_data
.
currentItem
().
text
(
0
))
self
.
text_info
.
append
(
"
Long name:
"
+
self
.
tree_data
.
currentItem
().
text
(
1
))
self
.
text_info
.
append
(
"
Attributes:
"
)
self
.
text_info
.
append
(
"
<b><font size=4>
"
+
"
File name:
"
+
ncFileName
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Title:
"
+
ncFileTitle
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Variable name:
"
+
self
.
tree_data
.
currentItem
().
text
(
0
)
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Long name:
"
+
self
.
tree_data
.
currentItem
().
text
(
1
)
+
"
</font></b>
"
)
self
.
text_info
.
append
(
"
"
)
self
.
text_info
.
append
(
"
<b><font size=3>
"
+
"
Attributes:
"
+
"
</font></b>
"
)
variableAttributes
=
list
(
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
parent
().
text
(
0
)].
variables
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
ncattrs
())
for
i
in
range
(
len
(
variableAttributes
)):
self
.
text_info
.
append
(
"
--
"
+
variableAttributes
[
i
]
+
"
:
"
+
str
(
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
parent
().
text
(
0
)].
variables
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
getncattr
(
variableAttributes
[
i
])))
self
.
text_info
.
append
(
"
<b>
"
+
"
--
"
+
variableAttributes
[
i
]
+
"
:
"
+
"
</b>
"
+
str
(
ncFile
.
groups
[
self
.
tree_data
.
currentItem
().
parent
().
text
(
0
)].
variables
[
self
.
tree_data
.
currentItem
().
text
(
0
)].
getncattr
(
variableAttributes
[
i
])))
#we close the netCDF file
ncFile
.
close
()
...
...
@@ -349,7 +352,12 @@ class maskAndFuntionality (BASE, WIDGET):
#load the raster layer into the QGIS canvas
rasterLayer
=
QgsRasterLayer
(
uri
,
nameOfRasterLayer
,
"
gdal
"
)
print
(
rasterLayer
.
isValid
())
if
not
rasterLayer
.
isValid
():
self
.
iface
.
messageBar
().
pushMessage
(
"
Error
"
,
"
The layer is not valid
"
,
level
=
Qgis
.
Critical
,
duration
=
5
)
return
#calculate the band number
...
...
This diff is collapsed.
Click to expand it.
metadata.txt
+
27
−
1
View file @
6e14b012
# This file contains metadata for your plugin. Since
# version 2.0 of QGIS this is the proper way to supply
# information about a plugin. The old method of
# embedding metadata in __init__.py will
# is no longer supported since version 2.0.
# This file should be included when you package your plugin.# Mandatory items:
[general]
name=EBVCubeVisualizer
email=e.oceguera@gmx.de
...
...
@@ -6,4 +15,21 @@ qgisMinimumVersion=3.0
description=The user can visualizes netCDF formatted data.
about=The Plugin visualizes netCDF formatted data in a more efficient way, as well as creates plots of the data and can be exported.
version=0.1
tags=python,netCDF,Visualizer
\ No newline at end of file
repository=https://github.com/EmmaOceg/EBVCubeVisualizerPlugin
#end of the mandatory metadata
#tags are comma separated with spaces allowed
tags=python,netCDF,Visualizer, EBVCube, EuropaBon
homepage=http://homepage
category=Plugins
icon=EBVIcon.png
#experimental flag
experimental=False
# deprecated flag (applies to the whole plugin, not just a single version)
deprecated=False
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