Commit 5d0aef9a authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

updated imports of GeoArray; fixed some broken indentations in...

updated imports of GeoArray; fixed some broken indentations in SpatialIndexMediator; updated environment variables within run script

- updated __version__
parent 165205fd
...@@ -9,12 +9,7 @@ database/processed_data/ ...@@ -9,12 +9,7 @@ database/processed_data/
.ipynb_checkpoints/ .ipynb_checkpoints/
__pycache__/ __pycache__/
algorithms/__pycache__/
algorithms/py_tools_ah/__pycache__/
io/__pycache__/
io/envi_io.py io/envi_io.py
misc/__pycache__/
processing/__pycache__/
testing/ENVIcompressed.bsq testing/ENVIcompressed.bsq
testing/ENVIcompressed.hdr testing/ENVIcompressed.hdr
testing/ENVIcompressed.worked.bsq testing/ENVIcompressed.worked.bsq
...@@ -26,6 +21,5 @@ testing/Landsat-8__OLI_TIRS__LC81930242016103LGN00__33UVT_L2C_selfcompressed.hdr ...@@ -26,6 +21,5 @@ testing/Landsat-8__OLI_TIRS__LC81930242016103LGN00__33UVT_L2C_selfcompressed.hdr
testing/Landsat-8__OLI_TIRS__LC81930242016119LGN00__32UPB_masks_L2C.bsq testing/Landsat-8__OLI_TIRS__LC81930242016119LGN00__32UPB_masks_L2C.bsq
testing/Landsat-8__OLI_TIRS__LC81930242016119LGN00__32UPB_masks_L2C.hdr testing/Landsat-8__OLI_TIRS__LC81930242016119LGN00__32UPB_masks_L2C.hdr
testing/Landsat-8__OLI_TIRS__LC81940242015091LGN00__32UNC_masks_L2C__compressed.bsq testing/Landsat-8__OLI_TIRS__LC81940242015091LGN00__32UNC_masks_L2C__compressed.bsq
testing/__pycache__/
testing/job_logs/ testing/job_logs/
testing/meta_validation/ testing/meta_validation/
...@@ -51,7 +51,7 @@ import ephem ...@@ -51,7 +51,7 @@ import ephem
from shapely.geometry import MultiPoint, Polygon from shapely.geometry import MultiPoint, Polygon
from shapely.ops import cascaded_union from shapely.ops import cascaded_union
from py_tools_ds.ptds import GeoArray from geoarray import GeoArray
from py_tools_ds.ptds.geo.coord_grid import snap_bounds_to_pixGrid from py_tools_ds.ptds.geo.coord_grid import snap_bounds_to_pixGrid
from py_tools_ds.ptds.geo.coord_trafo import transform_utm_to_wgs84, transform_wgs84_to_utm, mapXY2imXY, imXY2mapXY from py_tools_ds.ptds.geo.coord_trafo import transform_utm_to_wgs84, transform_wgs84_to_utm, mapXY2imXY, imXY2mapXY
from py_tools_ds.ptds.geo.projection import get_UTMzone, EPSG2WKT, isProjectedOrGeographic from py_tools_ds.ptds.geo.projection import get_UTMzone, EPSG2WKT, isProjectedOrGeographic
......
...@@ -14,7 +14,7 @@ import matplotlib.pyplot as plt ...@@ -14,7 +14,7 @@ import matplotlib.pyplot as plt
import numpy as np import numpy as np
from pyhdf import SD from pyhdf import SD
from py_tools_ds.ptds import GeoArray from geoarray import GeoArray
from py_tools_ds.ptds.geo.coord_calc import calc_FullDataset_corner_positions from py_tools_ds.ptds.geo.coord_calc import calc_FullDataset_corner_positions
from py_tools_ds.ptds.geo.coord_trafo import pixelToLatLon from py_tools_ds.ptds.geo.coord_trafo import pixelToLatLon
from py_tools_ds.ptds.geo.map_info import mapinfo2geotransform from py_tools_ds.ptds.geo.map_info import mapinfo2geotransform
......
...@@ -27,8 +27,8 @@ import numpy as np ...@@ -27,8 +27,8 @@ import numpy as np
from geopandas import GeoDataFrame from geopandas import GeoDataFrame
from shapely.geometry import box from shapely.geometry import box
from CoReg_Sat import COREG, DESHIFTER from CoReg_Sat import COREG, DESHIFTER
from py_tools_ds.ptds import GeoArray from geoarray import GeoArray
from py_tools_ds.ptds.geo.coord_grid import is_coord_grid_equal from py_tools_ds.ptds.geo.coord_grid import is_coord_grid_equal
from py_tools_ds.ptds.geo.coord_calc import corner_coord_to_minmax from py_tools_ds.ptds.geo.coord_calc import corner_coord_to_minmax
from py_tools_ds.ptds.geo.coord_trafo import reproject_shapelyGeometry, transform_any_prj from py_tools_ds.ptds.geo.coord_trafo import reproject_shapelyGeometry, transform_any_prj
......
...@@ -22,7 +22,7 @@ try: ...@@ -22,7 +22,7 @@ try:
except ImportError: except ImportError:
import osr import osr
from py_tools_ds.ptds import GeoArray from geoarray import GeoArray
from py_tools_ds.ptds.geo.map_info import mapinfo2geotransform from py_tools_ds.ptds.geo.map_info import mapinfo2geotransform
from ..config import GMS_config as CFG from ..config import GMS_config as CFG
......
...@@ -13,11 +13,11 @@ import warnings ...@@ -13,11 +13,11 @@ import warnings
import numpy as np import numpy as np
from py_tools_ds.ptds import GeoArray from geoarray import GeoArray
from py_tools_ds.ptds.geo.map_info import mapinfo2geotransform from py_tools_ds.ptds.geo.map_info import mapinfo2geotransform
from ..config import GMS_config as CFG from ..config import GMS_config as CFG
from .L1C_P import L1C_object from .L1C_P import L1C_object
def get_DESHIFTER_configs(dicts_GMS_obj, attrnames2deshift, proc_bandwise=False, paramsFromUsecase=True, **kwargs): def get_DESHIFTER_configs(dicts_GMS_obj, attrnames2deshift, proc_bandwise=False, paramsFromUsecase=True, **kwargs):
......
...@@ -25,12 +25,12 @@ except ImportError: ...@@ -25,12 +25,12 @@ except ImportError:
import gdalnumeric import gdalnumeric
from py_tools_ds.ptds.io.raster.GeoArray import GeoArray, NoDataMask, CloudMask from geoarray import GeoArray, NoDataMask, CloudMask
from py_tools_ds.ptds.geo.coord_grid import is_coord_grid_equal from py_tools_ds.ptds.geo.coord_grid import is_coord_grid_equal
from py_tools_ds.ptds.geo.projection import WKT2EPSG from py_tools_ds.ptds.geo.projection import WKT2EPSG
from py_tools_ds.ptds.geo.coord_calc import calc_FullDataset_corner_positions from py_tools_ds.ptds.geo.coord_calc import calc_FullDataset_corner_positions
from py_tools_ds.ptds.geo.coord_trafo import pixelToLatLon, pixelToMapYX, imXY2mapXY from py_tools_ds.ptds.geo.coord_trafo import pixelToLatLon, pixelToMapYX, imXY2mapXY
from py_tools_ds.ptds.geo.map_info import geotransform2mapinfo, mapinfo2geotransform from py_tools_ds.ptds.geo.map_info import geotransform2mapinfo, mapinfo2geotransform
from ..misc.logging import GMS_logger from ..misc.logging import GMS_logger
from ..misc.mgrs_tile import MGRS_tile from ..misc.mgrs_tile import MGRS_tile
...@@ -46,7 +46,6 @@ from ..misc import definition_dicts as DEF_D ...@@ -46,7 +46,6 @@ from ..misc import definition_dicts as DEF_D
from S2SCAPEM.options import get_options as get_ac_options from S2SCAPEM.options import get_options as get_ac_options
class GMS_object(object): class GMS_object(object):
def __init__(self): def __init__(self):
......
...@@ -38,7 +38,7 @@ from ..misc.logging import GMS_logger ...@@ -38,7 +38,7 @@ from ..misc.logging import GMS_logger
from ..misc.database_tools import get_overlapping_scenes_from_postgreSQLdb from ..misc.database_tools import get_overlapping_scenes_from_postgreSQLdb
from ..misc.path_generator import path_generator, get_tempfile from ..misc.path_generator import path_generator, get_tempfile
from py_tools_ds.ptds import GeoArray from geoarray import GeoArray
from py_tools_ds.ptds.geo.coord_calc import corner_coord_to_minmax from py_tools_ds.ptds.geo.coord_calc import corner_coord_to_minmax
from py_tools_ds.ptds.geo.coord_trafo import transform_any_prj from py_tools_ds.ptds.geo.coord_trafo import transform_any_prj
......
...@@ -49,7 +49,7 @@ class SpatialIndexMediatorServer: ...@@ -49,7 +49,7 @@ class SpatialIndexMediatorServer:
%outputStr.replace('\n','')) %outputStr.replace('\n',''))
else: else:
warnings.warn("\nCommunication to Spatial Index Mediator Server was successful but " warnings.warn("\nCommunication to Spatial Index Mediator Server was successful but "
"the server is still not running."% outputStr.replace('\n', '')) "the server is still not running. Returned message was: %s"% outputStr.replace('\n', ''))
def stop(self): def stop(self):
outputStr = self._communicate('stop') outputStr = self._communicate('stop')
...@@ -167,7 +167,7 @@ class SpatialIndexMediator: ...@@ -167,7 +167,7 @@ class SpatialIndexMediator:
seasonCode = self.__deriveSeasonCode(refDate, maxDaysDelta) seasonCode = self.__deriveSeasonCode(refDate, maxDaysDelta)
# pack the rest # pack the rest
# TODO: send unconstraint min/max proclevel values # TODO: send unconstraint min/max proclevel values
struct.pack_into('> i 2b h 2b', b, offset, seasonCode, minCloudCover, maxCloudCover, datasetid, 0, 127) struct.pack_into('> i 2b h 2b', b, offset, seasonCode, minCloudCover, maxCloudCover, datasetid, 0, 127)
# get connection and lock the channel # get connection and lock the channel
...@@ -207,8 +207,8 @@ class SpatialIndexMediator: ...@@ -207,8 +207,8 @@ class SpatialIndexMediator:
for _x in range(numScenes): for _x in range(numScenes):
scenedata = struct.unpack_from('> i h 9b', b, offset) scenedata = struct.unpack_from('> i h 9b', b, offset)
offset += 15 offset += 15
print scenedata #print(scenedata)
timestamp = datetime(scenedata[1], scenedata[2], scenedata[3], scenedata[4], scenedata[5], scenedata[6]) timestamp = datetime(scenedata[1], scenedata[2], scenedata[3], scenedata[4], scenedata[5], scenedata[6])
# ignore unused scenedata[7] # ignore unused scenedata[7]
...@@ -304,7 +304,7 @@ class Scene: ...@@ -304,7 +304,7 @@ class Scene:
self.sceneid = sceneid self.sceneid = sceneid
self.acquisitiondate = acquisitiondate self.acquisitiondate = acquisitiondate
self.cloudcover = cloudcover self.cloudcover = cloudcover
self.proclevel = proclevel; self.proclevel = proclevel
self.bounds = bounds self.bounds = bounds
tempList = list(bounds) + [None] * 2 tempList = list(bounds) + [None] * 2
self.coordsLonLat = [tempList[n:n + 2] for n in range(0, len(bounds), 2)] self.coordsLonLat = [tempList[n:n + 2] for n in range(0, len(bounds), 2)]
......
...@@ -10,17 +10,18 @@ PFX=/home/gfz-fe/python_GFZ ...@@ -10,17 +10,18 @@ PFX=/home/gfz-fe/python_GFZ
export PATH_PYTHON_GFZ=${PFX}/python/bin:${PFX}/opt/bin export PATH_PYTHON_GFZ=${PFX}/python/bin:${PFX}/opt/bin
export LD_PATH_PYTHON_GFZ=${PFX}/opt/lib:${PFX}/python/lib export LD_PATH_PYTHON_GFZ=${PFX}/opt/lib:${PFX}/python/lib
export PATH=$PATH_PYTHON_GFZ:$PATH export PATH=${PATH_PYTHON_GFZ}:$PATH
export LD_LIBRARY_PATH=$LD_PATH_PYTHON_GFZ:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=${LD_PATH_PYTHON_GFZ}:${LD_LIBRARY_PATH}
export PYTHONPATH=${PFX}/opt/lib/python3.5/site-packages:${PFX}/opt/lib/python2.7/site-packages export PYTHONPATH=${PFX}/opt/lib/python3.5/site-packages:${PFX}/opt/lib/python2.7/site-packages
export GDAL_DATA=${PFX}/opt/share/gdal export GDAL_DATA=${PFX}/opt/share/gdal
export PYTHONPATH=$PYTHONPATH:/home/gfz-fe/scheffler/python # needed to find e.g. CoReg_Sat, py_tools_ds export PYTHONPATH=${PYTHONPATH}:/home/gfz-fe/GeoMultiSens_deployed/geoarray # needed to find geoarray
export PYTHONPATH=$PYTHONPATH:/home/gfz-fe/hollstein/python/AT4P # needed to find e.g. AT4P export PYTHONPATH=${PYTHONPATH}:/home/gfz-fe/GeoMultiSens_deployed # needed to find e.g. CoReg_Sat, py_tools_ds
export PYTHONPATH=$PYTHONPATH:/home/gfz-fe/hollstein/python/ECMWF # needed to find e.g. ECMWF export PYTHONPATH=${PYTHONPATH}:/home/gfz-fe/hollstein/python/AT4P # needed to find AT4P
export PYTHONPATH=$PYTHONPATH:/home/gfz-fe/hollstein/python/S2MSI # needed to find e.g. S2MSI export PYTHONPATH=${PYTHONPATH}:/home/gfz-fe/hollstein/python/ECMWF # needed to find ECMWF
export PYTHONPATH=$PYTHONPATH:/home/gfz-fe/hollstein/python/S2SCAPEM # needed to find e.g. S2SCAPEM export PYTHONPATH=${PYTHONPATH}:/home/gfz-fe/hollstein/python/S2MSI # needed to find S2MSI
export PYTHONPATH=$PYTHONPATH:/home/gfz-fe/hollstein/python/cBc # needed to find e.g. cBc export PYTHONPATH=${PYTHONPATH}:/home/gfz-fe/hollstein/python/S2SCAPEM # needed to find S2SCAPEM
export PYTHONPATH=${PYTHONPATH}:/home/gfz-fe/hollstein/python/cBc # needed to find cBc
# execute python script # execute python script
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment