Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EO Time Series Viewer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository 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
Benjamin Jakimow
EO Time Series Viewer
Commits
80653035
Commit
80653035
authored
8 years ago
by
Benjamin Jakimow
Browse files
Options
Downloads
Patches
Plain Diff
settingsdialog.ui replaced QDeclarative by ParameterTree widget
parent
9e441915
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
timeseriesviewer/timeseries.py
+8
-33
8 additions, 33 deletions
timeseriesviewer/timeseries.py
timeseriesviewer/ui/icons/system.png
+0
-0
0 additions, 0 deletions
timeseriesviewer/ui/icons/system.png
timeseriesviewer/ui/settingsdialog.ui
+10
-4
10 additions, 4 deletions
timeseriesviewer/ui/settingsdialog.ui
with
18 additions
and
37 deletions
timeseriesviewer/timeseries.py
+
8
−
33
View file @
80653035
...
...
@@ -232,7 +232,7 @@ def verifyInputImage(path, vrtInspection=''):
print
(
'
{}GDAL unable to open:
'
.
format
(
vrtInspection
,
path
))
return
False
if
ds
.
GetDriver
().
ShortName
==
'
VRT
'
:
vrtInspection
=
'
Inspection {}
\n
'
.
format
(
path
)
vrtInspection
=
'
VRT
Inspection {}
\n
'
.
format
(
path
)
validSrc
=
[
verifyInputImage
(
p
,
vrtInspection
=
vrtInspection
)
for
p
in
set
(
ds
.
GetFileList
())
-
set
([
path
])]
return
all
(
validSrc
)
else
:
...
...
@@ -263,25 +263,22 @@ class TimeSeriesDatum(QObject):
def
__init__
(
self
,
timeSeries
,
pathImg
,
pathMsk
=
None
):
def
__init__
(
self
,
timeSeries
,
lyr
,
pathMsk
=
None
):
super
(
TimeSeriesDatum
,
self
).
__init__
()
assert
os
.
path
.
exists
(
pathImg
)
assert
isinstance
(
lyr
,
QgsRasterLayer
)
assert
lyr
.
isValid
()
self
.
lyrImg
=
lyr
self
.
timeSeries
=
timeSeries
self
.
pathImg
=
pathImg
self
.
pathMsk
=
None
assert
os
.
path
.
exists
(
pathImg
)
self
.
lyrImg
=
QgsRasterLayer
(
pathImg
,
os
.
path
.
basename
(
pathImg
),
False
)
assert
self
.
lyrImg
.
isValid
()
self
.
uriImg
=
self
.
lyrImg
.
dataProvider
().
dataSourceUri
()
self
.
pathImg
=
self
.
lyrImg
.
dataProvider
().
dataSourceUri
()
self
.
crs
=
self
.
lyrImg
.
dataProvider
().
crs
()
self
.
sensor
=
SensorInstrument
(
self
.
lyrImg
)
self
.
date
=
getImageDate
(
self
.
lyr
Img
)
self
.
date
=
getImageDate
(
self
.
lyr
)
self
.
doy
=
getDOYfromDate
(
self
.
date
)
assert
self
.
date
is
not
None
,
'
Unable to find acquisition date of {}
'
.
format
(
pathImg
)
self
.
ns
=
self
.
lyrImg
.
width
()
self
.
nl
=
self
.
lyrImg
.
height
()
self
.
nb
=
self
.
lyrImg
.
bandCount
()
...
...
@@ -289,9 +286,6 @@ class TimeSeriesDatum(QObject):
self
.
mVisibility
=
True
if
pathMsk
:
self
.
setMask
(
pathMsk
)
def
rank
(
self
):
return
self
.
timeSeries
.
index
(
self
)
...
...
@@ -568,25 +562,6 @@ def getImageDate(lyr):
return
date
def
PFunc_TimeSeries_getSpatialChip
(
TSD
,
bbWkt
,
srsWkt
,
bands
=
[
4
,
5
,
3
]):
chipdata
=
TSD
.
readSpatialChip
(
bbWkt
,
srs
=
srsWkt
,
bands
=
bands
)
return
TSD
,
chipdata
def
px2Coordinate
(
gt
,
pxX
,
pxY
,
upper_left
=
True
):
cx
=
gt
[
0
]
+
pxX
*
gt
[
1
]
+
pxY
*
gt
[
2
]
cy
=
gt
[
3
]
+
pxX
*
gt
[
4
]
+
pxY
*
gt
[
5
]
if
not
upper_left
:
cx
+=
gt
[
1
]
*
0.5
cy
+=
gt
[
5
]
*
0.5
return
cx
,
cy
def
coordinate2px
(
gt
,
cx
,
cy
):
px
=
int
((
cx
-
gt
[
0
])
/
gt
[
1
])
py
=
int
((
cy
-
gt
[
3
])
/
gt
[
5
])
return
px
,
py
regYYYYDOY
=
re
.
compile
(
r
'
(19|20)\d{5}
'
)
regYYYYMMDD
=
re
.
compile
(
r
'
(19|20)\d{2}-\d{2}-\d{2}
'
)
...
...
This diff is collapsed.
Click to expand it.
timeseriesviewer/ui/icons/system.png
LFS
+
0
−
0
View replaced file @
9e441915
View file @
80653035
2.07 KiB
|
W:
|
H:
129 B
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
timeseriesviewer/ui/settingsdialog.ui
+
10
−
4
View file @
80653035
...
...
@@ -15,7 +15,13 @@
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QDeclarativeView"
name=
"declarativeView"
/>
<widget
class=
"ParameterTree"
name=
"treeWidget"
>
<column>
<property
name=
"text"
>
<string
notr=
"true"
>
1
</string>
</property>
</column>
</widget>
</item>
<item>
<widget
class=
"QDialogButtonBox"
name=
"buttonBox"
>
...
...
@@ -31,9 +37,9 @@
</widget>
<customwidgets>
<customwidget>
<class>
QDeclarativeView
</class>
<extends>
Q
GraphicsView
</extends>
<header>
QtDeclarative/QDeclarativeView
</header>
<class>
ParameterTree
</class>
<extends>
Q
TreeWidget
</extends>
<header>
pyqtgraph.parametertree
</header>
</customwidget>
</customwidgets>
<resources/>
...
...
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