Commit 2654b60b authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

refactoring: renamed timeseriesviewer to eotimeseriesviewer

fixed bug in vector layer visualization
pulled qps updates
parent 2efa3c79
2019-03-29
- renamed plugin folder from "timeseriesviewerplugin" to "EOTimeSeriesViewer".
- improved SpectraLibrary tool
- CI tests with bitbucket pipelines
- several bug fixes
2019-03-01
- increased version to 0.8
- added labeling panel
......
......@@ -34,5 +34,5 @@ def classFactory(iface): # pylint: disable=invalid-name
if not d in sys.path:
sys.path.append(d)
from timeseriesviewer.timeseriesviewerplugin import TimeSeriesViewerPlugin
from eotimeseriesviewer.timeseriesviewerplugin import TimeSeriesViewerPlugin
return TimeSeriesViewerPlugin(iface)
# This is a sample build configuration for Python.
# Check our guides at https://confluence.atlassian.com/x/x4UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: qgis/qgis
pipelines:
default:
- step:
services:
- docker
caches:
- docker
- pip
script: # Modify the commands below to build your repository.
- python -m pip install -r requirements.txt
# - Xvfb :1
# - xvfb-run
# - startx
# - pushd /usr/src
# - xvfb-run nose2-3
# - popd
- apt-get update
- apt-get install xvfb
- Xvfb :1 -screen 0 1024x768x16 &> xvfb.log &
- ps aux | grep X
- DISPLAY=:1.0
- export DISPLAY
- python -m unittest discover tests "test_*.py"
# - python -m pip install pytest-cov
# - py.test --cov enmapbox --cov-report term-missing enmapboxtesting
......@@ -99,10 +99,10 @@ author = 'Benjamin Jakimow, Fabian Thiel'
# built documents.
#
# The short X.Y version.
import timeseriesviewer
version = u'{}'.format(timeseriesviewer.__version__)
import eotimeseriesviewer
version = u'{}'.format(eotimeseriesviewer.__version__)
# The full version, including alpha/beta/rc tags.
release = u'{}'.format(timeseriesviewer.__version__)
release = u'{}'.format(eotimeseriesviewer.__version__)
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -108,8 +108,8 @@ def initResources():
:return:
"""
try:
import timeseriesviewer.ui.resources
timeseriesviewer.ui.resources.qInitResources()
import eotimeseriesviewer.ui.resources
eotimeseriesviewer.ui.resources.qInitResources()
except:
print('Unable to initialize EO Time Series Viewer ressources', file=sys.stderr)
......
......@@ -20,14 +20,17 @@
def run():
# add site-packages to sys.path
from timeseriesviewer.tests import initQgisApplication
from eotimeseriesviewer.tests import initQgisApplication
qgsApp = initQgisApplication()
from timeseriesviewer.main import TimeSeriesViewer
from eotimeseriesviewer import initAll
initAll()
from eotimeseriesviewer.main import TimeSeriesViewer
ts = TimeSeriesViewer(None)
ts.run()
qgsApp.exec_()
qgsApp.exitQgis()
if __name__ == '__main__':
run()
......@@ -7,11 +7,11 @@ from qgis.PyQt.QtGui import *
from qgis.PyQt.QtWidgets import *
from osgeo import gdal
from timeseriesviewer.utils import loadUI, qgisInstance
from eotimeseriesviewer.utils import loadUI, qgisInstance
from qps.classification.classificationscheme \
import ClassificationSchemeWidget, ClassificationScheme, ClassInfo, ClassificationSchemeComboBox
from timeseriesviewer.timeseries import TimeSeriesDatum
from eotimeseriesviewer.timeseries import TimeSeriesDatum
from qps.layerproperties import *
#the QgsProject(s) and QgsMapLayerStore(s) to search for QgsVectorLayers
MAP_LAYER_STORES = [QgsProject.instance()]
......
......@@ -7,7 +7,7 @@ from qgis.PyQt.QtGui import *
from qgis.PyQt.QtWidgets import *
from timeseriesviewer.utils import loadUI
from eotimeseriesviewer.utils import loadUI
class LabelFieldModel(QgsFieldModel):
......
......@@ -39,10 +39,10 @@ if os.path.exists(path):
"""
import qgis.utils
from timeseriesviewer.utils import *
from timeseriesviewer.timeseries import *
from timeseriesviewer.profilevisualization import SpectralTemporalVisualization
from timeseriesviewer import SpectralProfile, SpectralLibrary
from eotimeseriesviewer.utils import *
from eotimeseriesviewer.timeseries import *
from eotimeseriesviewer.profilevisualization import SpectralTemporalVisualization
from eotimeseriesviewer import SpectralProfile, SpectralLibrary
DEBUG = False
......@@ -66,14 +66,13 @@ class TimeSeriesViewerUI(QMainWindow,
# #widgets-and-dialogs-with-auto-connect
self.setupUi(self)
self.addActions(self.findChildren(QAction))
from timeseriesviewer import TITLE, icon, __version__
from eotimeseriesviewer import TITLE, icon, __version__
self.setWindowTitle('{} ({})'.format(TITLE, __version__))
self.setWindowIcon(icon())
if sys.platform == 'darwin':
self.menuBar().setNativeMenuBar(False)
# set button default actions -> this will show the action icons as well
# I don't know why this is not possible in the QDesigner when QToolButtons are
# placed outside a toolbar
......@@ -94,14 +93,14 @@ class TimeSeriesViewerUI(QMainWindow,
# self.dockRendering = addDockWidget(docks.RenderingDockUI(self))
if DEBUG:
from timeseriesviewer.labeling import LabelingDock
from eotimeseriesviewer.labeling import LabelingDock
self.dockLabeling = addDockWidget(LabelingDock(self))
self.dockLabeling.setHidden(True)
from timeseriesviewer.sensorvisualization import SensorDockUI
from eotimeseriesviewer.sensorvisualization import SensorDockUI
self.dockSensors = addDockWidget(SensorDockUI(self))
from timeseriesviewer.mapvisualization import MapViewCollectionDock
from eotimeseriesviewer.mapvisualization import MapViewCollectionDock
self.dockMapViews = addDockWidget(MapViewCollectionDock(self))
from qps.cursorlocationvalue import CursorLocationInfoDock
......@@ -116,9 +115,9 @@ class TimeSeriesViewerUI(QMainWindow,
# self.dockMapViews = addDockWidget(MapViewDockUI(self))
self.dockTimeSeries = addDockWidget(TimeSeriesDockUI(self))
from timeseriesviewer.profilevisualization import ProfileViewDockUI
from eotimeseriesviewer.profilevisualization import ProfileViewDockUI
self.dockProfiles = addDockWidget(ProfileViewDockUI(self))
from timeseriesviewer.labeling import LabelingDock
from eotimeseriesviewer.labeling import LabelingDock
self.dockLabeling = addDockWidget(LabelingDock(self))
......@@ -131,6 +130,7 @@ class TimeSeriesViewerUI(QMainWindow,
self.dockSpectralLibrary = addDockWidget(panel)
self.tabifyDockWidget(self.dockTimeSeries, self.dockSpectralLibrary)
except Exception as ex:
print('Unable to create SpectralLibrary panel', file=sys.stderr)
print(ex, file=sys.stderr)
self.dockSpectralLibrary = None
......@@ -142,7 +142,7 @@ class TimeSeriesViewerUI(QMainWindow,
area = Qt.RightDockWidgetArea
from timeseriesviewer.systeminfo import SystemInfoDock
from eotimeseriesviewer.systeminfo import SystemInfoDock
self.dockSystemInfo = addDockWidget(SystemInfoDock(self))
self.dockSystemInfo.setVisible(False)
......@@ -248,8 +248,8 @@ class TimeSeriesViewer(QgisInterface, QObject):
QApplication.processEvents()
self.mMapLayerStore = QgsMapLayerStore()
import timeseriesviewer.utils
timeseriesviewer.utils.MAP_LAYER_STORES.insert(0,self.mapLayerStore())
import eotimeseriesviewer.utils
eotimeseriesviewer.utils.MAP_LAYER_STORES.insert(0, self.mapLayerStore())
self.ui = TimeSeriesViewerUI()
......@@ -285,7 +285,7 @@ class TimeSeriesViewer(QgisInterface, QObject):
lambda dt: self.ui.dockSystemInfo.addTimeDelta('Pixel Profile', dt))
assert isinstance(self, TimeSeriesViewer)
from timeseriesviewer.mapvisualization import SpatialTemporalVisualization
from eotimeseriesviewer.mapvisualization import SpatialTemporalVisualization
self.spatialTemporalVis = SpatialTemporalVisualization(self)
#self.spatialTemporalVis.sigLoadingStarted.connect(self.ui.dockRendering.addStartedWork)
#self.spatialTemporalVis.sigLoadingFinished.connect(self.ui.dockRendering.addFinishedWork)
......@@ -306,7 +306,7 @@ class TimeSeriesViewer(QgisInterface, QObject):
assert isinstance(tstv, TimeSeriesTableView)
tstv.sigMoveToDateRequest.connect(self.showTimeSeriesDatum)
from timeseriesviewer.mapcanvas import MapTools
from eotimeseriesviewer.mapcanvas import MapTools
self.ui.actionMoveCenter.triggered.connect(lambda : self.spatialTemporalVis.setMapTool(MapTools.MoveToCenter))
#D.actionSelectArea.triggered.connect(lambda : self.spatialTemporalVis.activateMapTool('selectArea'))
......@@ -339,12 +339,12 @@ class TimeSeriesViewer(QgisInterface, QObject):
self.ui.actionShowCrosshair.toggled.connect(self.spatialTemporalVis.setCrosshairVisibility)
# connect buttons with actions
from timeseriesviewer.widgets import AboutDialogUI
from eotimeseriesviewer.widgets import AboutDialogUI
self.ui.actionAbout.triggered.connect(lambda: AboutDialogUI(self.ui).exec_())
self.ui.actionSettings.triggered.connect(self.onShowSettingsDialog)
import webbrowser
from timeseriesviewer import DOCUMENTATION
from eotimeseriesviewer import DOCUMENTATION
self.ui.actionShowOnlineHelp.triggered.connect(lambda: webbrowser.open(DOCUMENTATION))
from qps.speclib.spectrallibraries import SpectralLibraryPanel
......@@ -460,7 +460,7 @@ class TimeSeriesViewer(QgisInterface, QObject):
qgis.utils.iface = self
def onShowSettingsDialog(self):
from timeseriesviewer.settings import SettingsDialog
from eotimeseriesviewer.settings import SettingsDialog
d = SettingsDialog(self.ui)
r = d.exec_()
......@@ -477,25 +477,24 @@ class TimeSeriesViewer(QgisInterface, QObject):
"""
from timeseriesviewer.settings import value, Keys, defaultValues, setValue
from eotimeseriesviewer.settings import value, Keys, defaultValues, setValue
#the default values
# the default values
defaults = defaultValues()
for key in list(Keys):
if value(key) == None:
setValue(key, defaults[key])
self.mTimeSeries.setDateTimePrecision(value(Keys.DateTimePrecision))
self.spatialTemporalVis.mMapRefreshTimer.start(value(Keys.MapUpdateInterval))
self.spatialTemporalVis.setBackgroundColor(value(Keys.MapBackgroundColor))
self.spatialTemporalVis.setMapSize(value(Keys.MapSize))
def onShowProfile(self, spatialPoint, mapCanvas, mapToolKey):
#self.spatialTemporalVis.sigShowProfiles.connect(self.spectralTemporalVis.loadCoordinate)
# self.spatialTemporalVis.sigShowProfiles.connect(self.spectralTemporalVis.loadCoordinate)
assert isinstance(spatialPoint, SpatialPoint)
assert isinstance(mapCanvas, QgsMapCanvas)
from timeseriesviewer.mapcanvas import MapTools
from eotimeseriesviewer.mapcanvas import MapTools
assert mapToolKey in MapTools.mapToolKeys()
if mapToolKey == MapTools.TemporalProfile:
......@@ -617,8 +616,8 @@ class TimeSeriesViewer(QgisInterface, QObject):
Returns the EO Time Series Viewer icon
:return: QIcon
"""
import timeseriesviewer
return timeseriesviewer.icon()
import eotimeseriesviewer
return eotimeseriesviewer.icon()
def logMessage(self, message, tag, level):
m = message.split('\n')
......@@ -670,7 +669,7 @@ class TimeSeriesViewer(QgisInterface, QObject):
def loadTimeSeriesStack(self):
from timeseriesviewer.stackedbandinput import StackedBandInputDialog
from eotimeseriesviewer.stackedbandinput import StackedBandInputDialog
d = StackedBandInputDialog(parent=self.ui)
if d.exec_() == QDialog.Accepted:
......
......@@ -22,7 +22,7 @@
import os, time, types, enum
from timeseriesviewer import CursorLocationMapTool
from eotimeseriesviewer import CursorLocationMapTool
from qgis.core import *
from qgis.gui import *
......@@ -38,7 +38,7 @@ from qps.crosshair.crosshair import CrosshairDialog, CrosshairStyle
from qps.maptools import *
from .labeling import LabelAttributeTableModel, labelShortcutLayers, layerClassSchemes, applyShortcutsToRegisteredLayers
from qps.classification.classificationscheme import ClassificationScheme, ClassInfo
import timeseriesviewer.settings
import eotimeseriesviewer.settings
def toQgsMimeDataUtilsUri(mapLayer:QgsMapLayer):
......@@ -395,7 +395,7 @@ class MapCanvas(QgsMapCanvas):
self.mapCanvasRefreshed.connect(onMapCanvasRefreshed)
self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
bg = timeseriesviewer.settings.value(timeseriesviewer.settings.Keys.MapBackgroundColor, default=QColor(0, 0, 0))
bg = eotimeseriesviewer.settings.value(eotimeseriesviewer.settings.Keys.MapBackgroundColor, default=QColor(0, 0, 0))
self.setCanvasColor(bg)
self.setContextMenuPolicy(Qt.DefaultContextMenu)
......@@ -447,7 +447,7 @@ class MapCanvas(QgsMapCanvas):
self.setCrosshairPosition(spatialPoint)
def setMapView(self, mapView):
from timeseriesviewer.mapvisualization import MapView
from eotimeseriesviewer.mapvisualization import MapView
assert isinstance(mapView, MapView)
self.mMapView = mapView
......@@ -703,7 +703,7 @@ class MapCanvas(QgsMapCanvas):
:param crosshairStyle: CrosshairStyle
:param emitSignal: Set to Fals to no emit a signal.
"""
from timeseriesviewer import CrosshairStyle
from eotimeseriesviewer import CrosshairStyle
if crosshairStyle is None:
self.mCrosshairItem.crosshairStyle.setShow(False)
self.mCrosshairItem.update()
......@@ -898,7 +898,7 @@ class MapCanvas(QgsMapCanvas):
menu.addSeparator()
from timeseriesviewer.utils import qgisInstance
from eotimeseriesviewer.utils import qgisInstance
actionAddRaster2QGIS = menu.addAction('Add raster layers(s) to QGIS')
actionAddRaster2QGIS.triggered.connect(lambda : self.addLayers2QGIS(
[l for l in self.layers() if isinstance(l, QgsRasterLayer)]
......@@ -939,7 +939,7 @@ class MapCanvas(QgsMapCanvas):
menu.exec_(event.globalPos())
def addLayers2QGIS(self, mapLayers):
from timeseriesviewer.utils import qgisInstance
from eotimeseriesviewer.utils import qgisInstance
iface = qgisInstance()
if isinstance(iface, QgisInterface):
grpNode= iface.layerTreeView().currentGroupNode()
......@@ -1043,10 +1043,10 @@ class MapCanvas(QgsMapCanvas):
:param fileType:
:return:
"""
import timeseriesviewer.settings
lastDir = timeseriesviewer.settings.value(timeseriesviewer.settings.Keys.ScreenShotDirectory, os.path.expanduser('~'))
from timeseriesviewer.utils import filenameFromString
from timeseriesviewer.mapvisualization import MapView
import eotimeseriesviewer.settings
lastDir = eotimeseriesviewer.settings.value(eotimeseriesviewer.settings.Keys.ScreenShotDirectory, os.path.expanduser('~'))
from eotimeseriesviewer.utils import filenameFromString
from eotimeseriesviewer.mapvisualization import MapView
if isinstance(self.mTSD, TimeSeriesDatum) and isinstance(self.mMapView, MapView):
path = filenameFromString('{}.{}'.format(self.mTSD.date(), self.mMapView.title()))
else:
......@@ -1055,14 +1055,14 @@ class MapCanvas(QgsMapCanvas):
path, _ = QFileDialog.getSaveFileName(self, 'Save map as {}'.format(fileType), path)
if len(path) > 0:
self.saveAsImage(path, None, fileType)
timeseriesviewer.settings.setValue(timeseriesviewer.settings.Keys.ScreenShotDirectory, os.path.dirname(path))
eotimeseriesviewer.settings.setValue(eotimeseriesviewer.settings.Keys.ScreenShotDirectory, os.path.dirname(path))
def defaultRasterRenderer(self)->QgsRasterRenderer:
"""
Returns the raster renderer in dependence of MapView and TimeSeriesDatum sensor
:return: QgsRasterRenderer
"""
from timeseriesviewer.mapvisualization import MapView
from eotimeseriesviewer.mapvisualization import MapView
if isinstance(self.mTSD, TimeSeriesDatum) and isinstance(self.mMapView, MapView):
return self.mMapView.sensorWidget(self.mTSD.sensor()).rasterRenderer()
else:
......
......@@ -32,12 +32,12 @@ from PyQt5.QtXml import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import numpy as np
from timeseriesviewer.utils import *
from timeseriesviewer import Option, OptionListModel
from timeseriesviewer.timeseries import SensorInstrument, TimeSeriesDatum, TimeSeries
from timeseriesviewer.utils import loadUI
from timeseriesviewer.mapviewscrollarea import MapViewScrollArea
from timeseriesviewer.mapcanvas import MapCanvas
from eotimeseriesviewer.utils import *
from eotimeseriesviewer import Option, OptionListModel
from eotimeseriesviewer.timeseries import SensorInstrument, TimeSeriesDatum, TimeSeries
from eotimeseriesviewer.utils import loadUI
from eotimeseriesviewer.mapviewscrollarea import MapViewScrollArea
from eotimeseriesviewer.mapcanvas import MapCanvas
from qps.crosshair.crosshair import CrosshairStyle
......@@ -62,7 +62,7 @@ class MapViewUI(QFrame, loadUI('mapviewdefinition.ui')):
self.btnToggleCrosshair.setMenu(m)
from timeseriesviewer.main import TimeSeriesViewer
from eotimeseriesviewer.main import TimeSeriesViewer
tsv = TimeSeriesViewer.instance()
self.mVectorSourceModel = self.cbQgsVectorLayer.model().sourceModel()
QgsProject.instance().layersAdded.connect(self.mVectorSourceModel.addLayers)
......@@ -670,7 +670,7 @@ class MapView(QObject):
sigSensorRendererChanged = pyqtSignal(SensorInstrument, QgsRasterRenderer)
sigVectorLayerChanged = pyqtSignal()
#sigVectorLayerChanged = pyqtSignal()
sigShowProfiles = pyqtSignal(SpatialPoint, MapCanvas, str)
......@@ -685,7 +685,7 @@ class MapView(QObject):
self.ui.tbName.textChanged.connect(self.sigTitleChanged.emit)
from timeseriesviewer import getCrosshairStyle
from eotimeseriesviewer import getCrosshairStyle
self.ui.actionSetCrosshairStyle.triggered.connect(
lambda : self.onCrosshairChanged(getCrosshairStyle(
parent=self.ui,
......@@ -782,24 +782,20 @@ class MapView(QObject):
:return:
"""
b = False
#remove last layer
# remove last layer
if isinstance(self.mVectorLayer, QgsVectorLayer):
for mapCanvas in self.mapCanvases():
if self.mVectorLayer in mapCanvas.mLayerSources.remove(self.mVectorLayer):
mapCanvas.mLayerSources.remove(self.mVectorLayer)
b = True
# add new layer
mapCanvas.mapLayerModel().removeMapLayerSources([self.mVectorLayer])
# add new vector layer
if isinstance(lyr, QgsVectorLayer) and self.ui.gbVectorRendering.isChecked():
b = True
#add vector layer
self.mVectorLayer = lyr
self.mVectorLayer.rendererChanged.connect(self.sigVectorLayerChanged)
for mapCanvas in self.mapCanvases():
assert isinstance(mapCanvas, MapCanvas)
mapCanvas.mapLayerModel().addMapLayerSources([self.mVectorLayer])
if b:
self.sigVectorLayerChanged.emit()
def applyStyles(self):
"""Applies all style changes to all sensor views."""
......@@ -925,7 +921,7 @@ class MapView(QObject):
:param mapCanvas:
:return:
"""
from timeseriesviewer.mapcanvas import MapCanvas
from eotimeseriesviewer.mapcanvas import MapCanvas
assert isinstance(mapCanvas, MapCanvas)
assert isinstance(sensor, SensorInstrument)
......@@ -960,7 +956,7 @@ class MapView(QObject):
Synchronizes all crosshair positions. Takes care of CRS differences.
:param spatialPoint: SpatialPoint of the new Crosshair position
"""
from timeseriesviewer import CrosshairStyle
from eotimeseriesviewer import CrosshairStyle
srcCanvas = self.sender()
if isinstance(srcCanvas, MapCanvas):
......@@ -1066,7 +1062,7 @@ class MapViewRenderSettings(QgsCollapsibleGroupBox, loadUI('mapviewrendersetting
self.mSensor.sigNameChanged.connect(self.onSensorNameChanged)
self.setTitle(self.mSensor.name())
from timeseriesviewer import OptionListModel, Option
from eotimeseriesviewer import OptionListModel, Option
rasterRendererModel = OptionListModel()
rasterRendererModel.addOption(Option(QgsMultiBandColorRenderer, name='Multibandcolor'))
rasterRendererModel.addOption(Option(QgsSingleBandGrayRenderer, name='Singlegray'))
......@@ -1212,7 +1208,7 @@ class MapViewRenderSettings(QgsCollapsibleGroupBox, loadUI('mapviewrendersetting
self.cbRenderType.currentIndex()
blocked = self.cbRenderType.blockSignals(True)
self.cbRenderType.setCurrentIndex(-1)
from timeseriesviewer import Option
from eotimeseriesviewer import Option
for i, o in enumerate(self.cbRenderType.model()):
assert isinstance(o, Option)
if isinstance(renderer, o.value()):
......@@ -1300,7 +1296,7 @@ def rendererToXml(renderer):
if isinstance(renderer, QgsRasterRenderer):
#create a dummy raster layer
import uuid
from timeseriesviewer.virtualrasters import write_vsimem, read_vsimem
from eotimeseriesviewer.virtualrasters import write_vsimem, read_vsimem
xml = """<VRTDataset rasterXSize="1" rasterYSize="1">
<GeoTransform> 0.0000000000000000e+00, 1.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, -1.0000000000000000e+00</GeoTransform>
<VRTRasterBand dataType="Float32" band="1">
......@@ -1548,7 +1544,7 @@ class DatumView(QObject):
def insertMapView(self, mapView):
assert isinstance(mapView, MapView)
from timeseriesviewer.mapcanvas import MapCanvas
from eotimeseriesviewer.mapcanvas import MapCanvas
mapCanvas = MapCanvas(self.ui)
mapCanvas.setObjectName('MapCanvas {} {}'.format(mapView.title(), self.TSD.mDate))
......@@ -1594,7 +1590,7 @@ class DatumView(QObject):
def registerMapCanvas(self, mapView, mapCanvas):
from timeseriesviewer.mapcanvas import MapCanvas
from eotimeseriesviewer.mapcanvas import MapCanvas
assert isinstance(mapCanvas, MapCanvas)
assert isinstance(mapView, MapView)
self.mMapCanvases[mapView] = mapCanvas
......@@ -1768,7 +1764,7 @@ class SpatialTemporalVisualization(QObject):
Connects a MapCanvas and its signals
:param mapCanvas: MapCanvas
"""
from timeseriesviewer.mapcanvas import MapCanvas
from eotimeseriesviewer.mapcanvas import MapCanvas
assert isinstance(mapCanvas, MapCanvas)
mapCanvas.setMapLayerStore(self.TSV.mMapLayerStore)
......@@ -1792,7 +1788,7 @@ class SpatialTemporalVisualization(QObject):
Synchronizes all crosshair positions. Takes care of CRS differences.
:param spatialPoint: SpatialPoint of new Crosshair position
"""
from timeseriesviewer import CrosshairStyle
from eotimeseriesviewer import CrosshairStyle
srcCanvas = self.sender()
if isinstance(srcCanvas, MapCanvas):
......@@ -1837,7 +1833,7 @@ class SpatialTemporalVisualization(QObject):
def setMapSize(self, size):
assert isinstance(size, QSize)
self.mSize = size
from timeseriesviewer.mapcanvas import MapCanvas
from eotimeseriesviewer.mapcanvas import MapCanvas
for mapCanvas in self.mMapCanvases:
assert isinstance(mapCanvas, MapCanvas)
mapCanvas.setFixedSize(size)
......@@ -1909,7 +1905,7 @@ class SpatialTemporalVisualization(QObject):
self.mMapToolActivator = self.sender()
del self.mMapTools[:]
from timeseriesviewer import MapTools, CursorLocationMapTool, SpectralProfileMapTool, TemporalProfileMapTool
from eotimeseriesviewer import MapTools, CursorLocationMapTool, SpectralProfileMapTool, TemporalProfileMapTool
for canvas in self.mMapCanvases:
mt = None
if mapToolKey in MapTools.mapToolKeys():
......
......@@ -29,7 +29,7 @@ from qgis.gui import *
from qgis.core import *
from PyQt5.QtCore import *
import numpy as np
from timeseriesviewer.utils import SpatialPoint, SpatialExtent, geo2px, px2geo
from eotimeseriesviewer.utils import SpatialPoint, SpatialExtent, geo2px, px2geo
from osgeo import gdal, gdal_array, osr
DEBUG = False
......
......@@ -28,14 +28,14 @@ from qgis.PyQt.QtCore import *
from qgis.PyQt.QtXml import *
from qgis.PyQt.QtGui import *
from timeseriesviewer import jp
from timeseriesviewer.timeseries import *
from timeseriesviewer.utils import SpatialExtent, SpatialPoint, px2geo, loadUI, nextColor
from eotimeseriesviewer import jp
from eotimeseriesviewer.timeseries import *
from eotimeseriesviewer.utils import SpatialExtent, SpatialPoint, px2geo, loadUI, nextColor
from qps.plotstyling.plotstyling import PlotStyle, PlotStyleButton
from timeseriesviewer.pixelloader import PixelLoader, PixelLoaderTask
from timeseriesviewer.sensorvisualization import SensorListModel
from timeseriesviewer.temporalprofiles2d import LABEL_EXPRESSION_2D
from timeseriesviewer.temporalprofiles3d import LABEL_EXPRESSION_3D
from eotimeseriesviewer.pixelloader import PixelLoader, PixelLoaderTask
from eotimeseriesviewer.sensorvisualization import SensorListModel
from eotimeseriesviewer.temporalprofiles2d import LABEL_EXPRESSION_2D
from eotimeseriesviewer.temporalprofiles3d import LABEL_EXPRESSION_3D
import pyqtgraph as pg
from pyqtgraph import functions as fn
......@@ -52,7 +52,7 @@ try:
#import OpenGL
OPENGL_AVAILABLE = True
from timeseriesviewer.temporalprofiles3d import *
from eotimeseriesviewer.temporalprofiles3d import *