Skip to content

Instantly share code, notes, and snippets.

View jkatagi's full-sized avatar

jkatagi jkatagi

View GitHub Profile
#!/usr/bin/env python3
# make patch images.
import subprocess
import argparse
import os
import re
def main():
@jkatagi
jkatagi / get_near_tank_value.py
Last active November 11, 2017 06:16
get dojo-suibun, first_tank_value, second_tank_value near these area: # Tajimi, Gihu, Ogaki, Ibigawa, Sekigahara, Minogamo, Nagoya, Ibukiyama and Maibara.
#!/usr/bin/env python3
# 2017/02/27 Jin Katagi
# get dojo-suibun, first_tank_value, second_tank_value near these area:
# Tajimi, Gihu, Ogaki, Ibigawa, Sekigahara, Minogamo, Nagoya, Ibukiyama and Maibara.
# usage) $./arrange.py
# output)
# day, lat, lon, dojo-suibun, first_tank_value, second_tank_value
import pytz
import datetime
# coding: utf-8
# 2017/04/13 Jin Katagi
import pandas as pd
import subprocess
import re
# In[2]:
@jkatagi
jkatagi / convert_latlon_UTM.py
Last active April 14, 2017 08:30
convert lat lon (latlon coordinate) to UTM using UTM zone info and cs2cs command.
# coding: utf-8
# In[40]:
import pandas as pd
import csv
import subprocess
import re
@jkatagi
jkatagi / tif_tools.py
Last active April 25, 2023 03:28
Read GeoTiff and convert numpy.array to GeoTiff.
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import os.path
import re
from osgeo import gdal
from osgeo import gdal_array
from osgeo import osr
@jkatagi
jkatagi / conevert_DN.py
Last active May 24, 2017 10:57
Convert DN to Reflection using GAIN BAND (I think it's more faster than using GRASS GIS and gdal_merge.py)
#!/usr/bin/env pytho3
# 2017/05/24 Jin Katagi
# convert DN to reflectance.
# usage) python3 convert_DN.py
import subprocess
import os
import re
from src import tif_tools
#!/usr/bin/env python3
# make patch images.
# 2017/03/17
# todo: true_color, false_colorを指定
import subprocess
import argparse
import os
import re