isce-framework / isce2

InSAR Scientific Computing Environment version 2
Other
495 stars 246 forks source link

plotBursts.py invalid latitude #278

Closed hardreddata closed 3 years ago

hardreddata commented 3 years ago

Motivated by https://github.com/isce-framework/isce2/issues/152 I am running plotBursts.py -i reference/ -f foo.pdf -k foo.kml for the first time in a folder prepared from stackSentinel.py.

It yields

This is the Open Source version of ISCE.
Some of the workflows depend on a separate licensed package.
To obtain the licensed package, please make a request for ISCE
through the website: https://download.jpl.nasa.gov/ops/request/index.cfm.
Alternatively, if you are a member, or can become a member of WinSAR
you may be able to obtain access to a version of the licensed sofware at
https://winsar.unavco.org/software/isce
2021-05-03 11:04:40,043 - matplotlib - DEBUG - (private) matplotlib data path: /home/russell/anaconda3/envs/insar/lib/python3.6/site-packages/matplotlib/mpl-data
2021-05-03 11:04:40,044 - matplotlib - DEBUG - matplotlib data path: /home/russell/anaconda3/envs/insar/lib/python3.6/site-packages/matplotlib/mpl-data
2021-05-03 11:04:40,050 - matplotlib - DEBUG - CONFIGDIR=/home/russell/.config/matplotlib
2021-05-03 11:04:40,053 - matplotlib - DEBUG - matplotlib version 3.3.3
2021-05-03 11:04:40,070 - matplotlib - DEBUG - interactive is False
2021-05-03 11:04:40,071 - matplotlib - DEBUG - platform is linux
2021-05-03 11:04:40,072 - matplotlib - DEBUG - loaded modules: ['builtins', 'sys', '_frozen_importlib', '_imp', '_warnings', '_thread', '_weakref', '_frozen_importlib_external', '_io', 'marshal', 'posix', 'zipimport', 'encodings', 'codecs', '_codecs', 'encodings.aliases', 'encodings.utf_8', '_signal', '__main__', 'encodings.latin_1', 'io', 'abc', '_weakrefset', 'site', 'os', 'errno', 'stat', '_stat', 'posixpath', 'genericpath', 'os.path', '_collections_abc', '_sitebuiltins', 'sysconfig', 'importlib', 'importlib._bootstrap', 'importlib._bootstrap_external', 'types', 'functools', '_functools', 'collections', 'operator', '_operator', 'keyword', 'heapq', '_heapq', 'itertools', 'reprlib', '_collections', 'weakref', 'collections.abc', 'warnings', 'importlib.util', 'importlib.abc', 'importlib.machinery', 'contextlib', '_sysconfigdata_x86_64_conda_cos6_linux_gnu', '_bootlocale', '_locale', 'mpl_toolkits', 'numpy', 'numpy._globals', 'numpy.__config__', 'numpy.version', 'numpy._distributor_init', 'numpy.core', 'numpy.core.multiarray', 'numpy.core.overrides', 'textwrap', 're', 'enum', 'sre_compile', '_sre', 'sre_parse', 'sre_constants', 'copyreg', 'datetime', 'time', 'math', '_datetime', 'numpy.core._multiarray_umath', 'numpy.compat', 'numpy.compat._inspect', 'numpy.compat.py3k', 'pathlib', 'fnmatch', 'ntpath', 'urllib', 'urllib.parse', 'pickle', 'struct', '_struct', '_compat_pickle', '_pickle', 'numpy.core.umath', 'numpy.core.numerictypes', 'numbers', 'numpy.core._string_helpers', 'numpy.core._type_aliases', 'numpy.core._dtype', 'numpy.core.numeric', 'numpy.core.shape_base', 'numpy.core._asarray', 'numpy.core.fromnumeric', 'numpy.core._methods', 'numpy.core._exceptions', 'numpy.core._ufunc_config', 'numpy.core.arrayprint', 'numpy.core.defchararray', 'numpy.core.records', 'numpy.core.memmap', 'numpy.core.function_base', 'numpy.core.machar', 'numpy.core.getlimits', 'numpy.core.einsumfunc', 'numpy.core._add_newdocs', 'numpy.core._multiarray_tests', 'numpy.core._dtype_ctypes', 'numpy.core._internal', 'ast', '_ast', 'platform', 'subprocess', 'signal', '_posixsubprocess', 'select', 'selectors', 'threading', 'traceback', 'linecache', 'tokenize', 'token', 'ctypes', '_ctypes', 'ctypes._endian', 'numpy._pytesttester', 'numpy.lib', 'numpy.lib.mixins', 'numpy.lib.scimath', 'numpy.lib.type_check', 'numpy.lib.ufunclike', 'numpy.lib.index_tricks', 'numpy.matrixlib', 'numpy.matrixlib.defmatrix', 'numpy.linalg', 'numpy.linalg.linalg', 'numpy.lib.twodim_base', 'numpy.linalg.lapack_lite', 'numpy.linalg._umath_linalg', 'numpy.lib.function_base', 'numpy.lib.histograms', 'numpy.lib.stride_tricks', 'numpy.lib.nanfunctions', 'numpy.lib.shape_base', 'numpy.lib.polynomial', 'numpy.lib.utils', 'numpy.lib.arraysetops', 'numpy.lib.npyio', 'numpy.lib.format', 'numpy.lib._datasource', 'shutil', 'zlib', 'bz2', '_compression', '_bz2', 'lzma', '_lzma', 'pwd', 'grp', 'numpy.lib._iotools', 'numpy.lib.financial', 'decimal', '_decimal', 'numpy.lib.arrayterator', 'numpy.lib.arraypad', 'numpy.lib._version', 'numpy.fft', 'numpy.fft._pocketfft', 'numpy.fft._pocketfft_internal', 'numpy.fft.helper', 'numpy.polynomial', 'numpy.polynomial.polynomial', 'numpy.polynomial.polyutils', 'numpy.polynomial._polybase', 'numpy.polynomial.chebyshev', 'numpy.polynomial.legendre', 'numpy.polynomial.hermite', 'numpy.polynomial.hermite_e', 'numpy.polynomial.laguerre', 'numpy.random', 'numpy.random._pickle', 'numpy.random.mtrand', 'cython_runtime', 'numpy.random.bit_generator', '_cython_0_29_21', 'numpy.random._common', 'secrets', 'base64', 'binascii', 'hmac', 'hashlib', '_hashlib', '_blake2', '_sha3', 'random', 'bisect', '_bisect', '_random', 'numpy.random._bounded_integers', 'numpy.random._mt19937', 'numpy.random._philox', 'numpy.random._pcg64', 'numpy.random._sfc64', 'numpy.random._generator', 'numpy.ctypeslib', 'numpy.ma', 'numpy.ma.core', 'numpy.ma.extras', 'numpy.testing', 'unittest', 'unittest.result', 'unittest.util', 'unittest.case', 'difflib', 'logging', 'string', '_string', 'atexit', 'pprint', 'unittest.suite', 'unittest.loader', 'unittest.main', 'argparse', 'copy', 'gettext', 'locale', 'unittest.runner', 'unittest.signals', 'numpy.testing._private', 'numpy.testing._private.utils', 'gc', 'tempfile', 'numpy.testing._private.decorators', 'numpy.testing._private.nosetester', 'isce', 'isce.release_history', 'logging.config', 'logging.handlers', 'socket', '_socket', 'queue', 'socketserver', 'configparser', 'isceobj', 'isceobj.Catalog', 'isceobj.Doppler', '__future__', 'isceobj.Registry', 'isceobj.Registry.Registry', 'isceobj.Scene', 'isceobj.Image', 'isceobj.Util', 'isceobj.Util.ImageUtil', 'isceobj.Util.ImageUtil.ImageLib', 'symtable', '_symtable', 'osgeo', 'swig_runtime_data4', 'osgeo._gdal', 'osgeo.gdal', 'osgeo.gdalconst', 'osgeo._gdalconst', 'osgeo.ogr', 'osgeo._ogr', 'osgeo.osr', 'osgeo._osr', 'isceobj.Util.decorators', 's1a_isce_utils', 'coregSwathSLCProduct', 'iscesys', 'iscesys.Component', 'iscesys.Component.Component', 'iscesys.Component.Configurable', 'iscesys.DictUtils', 'iscesys.DictUtils.DictUtils', 'iscesys.Compatibility', 'iscesys.Compatibility.Compatibility', 'iscesys.Traits', 'iscesys.Traits.Datetime', 'iscesys.StdOEL', 'iscesys.StdOEL.StdOELPy', 'iscesys.StdOEL.StdOEL', 'isceobj.Sensor', 'isceobj.Sensor.TOPS', 'isceobj.Sensor.TOPS.TOPSSwathSLCProduct', 'glob', 'matplotlib', 'distutils', 'distutils.version', 'inspect', 'dis', 'opcode', '_opcode', 'matplotlib.cbook', 'gzip', 'shlex', 'matplotlib.cbook.deprecation', 'matplotlib.rcsetup', 'matplotlib.animation', 'uuid', 'ctypes.util', 'matplotlib._animation_data', 'matplotlib.fontconfig_pattern', 'pyparsing', 'matplotlib.colors', 'matplotlib.docstring', 'matplotlib._color_data', 'cycler', 'six', 'six.moves', 'matplotlib._version', 'json', 'json.decoder', 'json.scanner', '_json', 'json.encoder', 'matplotlib.ft2font', 'dateutil', 'dateutil._version', 'kiwisolver']
2021-05-03 11:04:40,164 - matplotlib - DEBUG - CACHEDIR=/home/russell/.cache/matplotlib
2021-05-03 11:04:40,181 - matplotlib.font_manager - DEBUG - Using fontManager instance from /home/russell/.cache/matplotlib/fontlist-v330.json
2021-05-03 11:04:40,549 - matplotlib.pyplot - DEBUG - Loaded backend agg version unknown.
ERROR 1: Latitude 150.837066 is invalid. Valid range is [-90,90]. This warning will not be issued any more
Wrote KML file:  foo.kml

ERROR 1: Latitude 150.837066 is invalid. Valid range is [-90,90]. This warning will not be issued any more is not expected. The 150.83 is longitude where we expect coverage.

plotBursts_reference_secondaries.py is also not working.

I am not sure if this is somehow my problem or a problem with the routines. I would be happy to submit a pull request.

Advice invited.

piyushrpt commented 3 years ago

Lat/ Lon swapped. Order has been swapped in proj6 and gdal3 - to respect axis order in EPSG definitions. Flip here - https://github.com/isce-framework/isce2/blob/def109815df5f724c5dc653878314577e3505c48/contrib/stack/topsStack/plotBursts.py#L141-L145