Skip to content

Instantly share code, notes, and snippets.

View minorua's full-sized avatar
💭
...

Minoru Akagi minorua

💭
...
  • Okayama, Japan
  • 10:02 (UTC +09:00)
View GitHub Profile
@minorua
minorua / view_related.py
Last active October 14, 2015 00:57
[QGIS 1.8] an attribute action to view related records to the identified feature
@minorua
minorua / ksjdem.py
Last active December 13, 2015 23:39
translates DEM of National Land Numerical Information provided by MLIT into GeoTIFF.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ksjdem.py
# translates DEM of National Land Numerical Information provided by MLIT into GeoTIFF
# Copyright (c) 2012, Minoru Akagi.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@minorua
minorua / fgddem.py
Last active May 17, 2021 04:49
translates DEM files of Fundamental Geospatial Data provided by GSI into a GDAL supported format (which has write access).
#!/usr/bin/env python3
# name : fgddem.py
# purpose : translates digital elevation model of Fundamental Geospatial Data provided by GSI
# into a GDAL supported format (which has write access).
# license : The MIT License
# copyright : (c) 2012, Minoru Akagi
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
@minorua
minorua / j-shis_csv2geotiff.py
Last active December 13, 2015 23:39
translates csv file of "National Seismic Hazard Maps" provided by NIED into GeoTIFF files
#!/usr/bin/env python
# j-shis_csv2geotiff.py
# translates csv files of "National Seismic Hazard Maps" provided by NIED into GeoTIFF files
# Copyright (c) 2013, Minoru Akagi
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@minorua
minorua / GSIMaps.tsv
Last active December 5, 2020 12:57
[QGIS][TileLayerPlugin] 地理院地図(GSI Maps: http://maps.gsi.go.jp/ )のタイルをタイルレイヤプラグインで利用するためのレイヤ情報データです。タイル・ズームレベルによっては追加の出所明示が必要な場合があります。利用にあたっては国土地理院コンテンツ利用規約(http://www.gsi.go.jp/kikakuchousei/kikakuchousei40182.html )および地理院タイル一覧(http://maps.gsi.go.jp/development/ichiran.html )の該当箇所をよくお読み下さい。
#GSIMaps.tsv
#Last update: 2017-02-02
#title credit serviceUrl yOriginTop zmin zmax xmin ymin xmax ymax
標準地図 地理院タイル http://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png 1 2 18
淡色地図 地理院タイル http://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png 1 2 18
白地図 地理院タイル http://cyberjapandata.gsi.go.jp/xyz/blank/{z}/{x}/{y}.png 1 5 14 122.78 20.4 154.78 45.58
English 地理院タイル http://cyberjapandata.gsi.go.jp/xyz/english/{z}/{x}/{y}.png 1 5 11 122.78 20.4 154.78 45.58
色別標高図 地理院タイル http://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png 1 5 15 122.78 20.4 154.78 45.58
写真 地理院タイル http://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg 1 2 18
国土画像情報(第一期:1974~1978年撮影) 地理院タイル http://cyberjapandata.gsi.go.jp/xyz/gazo1/{z}/{x}/{y}.jpg 1 10 17 122.78 20.4 154.78 45.58
@minorua
minorua / check_translation.bat
Last active October 23, 2020 02:58
[QGIS][translation] a translation check script for ja
SET TS_FILE=%1
C:\Python38\python %~dp0check_translation.py -ct -cand %TS_FILE% > check.diff
pause
@minorua
minorua / update_translation_branch.sh
Last active August 29, 2015 14:02
[qgis-jp][GUI翻訳] translationブランチの更新スクリプト
#!/bin/bash
# qgis-jpのtranslatioinブランチにmasterの更新を取り入れ、qgis_ja.tsを更新するスクリプト
# begin : 2013-05-09
# remote repositories
# upstream: https://github.com/qgis/QGIS.git
# qgis-jp: git@github.com:qgis-jp/QGIS.git
updatediff=~/updates.diff
cd ~/dev/cpp/QGIS
@minorua
minorua / WMTSCapabilities.xml
Last active August 29, 2015 14:05
国土地理院の地理院タイルをQGIS等のWMTSクライアントから利用可能にするためのXML文書です。
<?xml version="1.0" encoding="utf-8"?>
<Capabilities version="1.0.0" xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd">
<ServiceMetadataURL xlink:href="https://gist.githubusercontent.com/minorua/1f047985f87597030dce/raw/WMTSCapabilities.xml"/>
<ows:ServiceIdentification>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
<ows:Title>地理院タイル(WMTSテスト)</ows:Title>
<ows:Abstract xml:lang="ja">このサービスは国土地理院の地理院タイルをWMTSクライアントから利用可能にします。こうしたWMTSメタデータ(XML文書)は第三者が公開するべきではないと思われますが、QGISからのWMTS利用の試験用として暫時公開します。地理院タイルの利用にあたっては地理院タイル利用規約(http://portal.cyberjapan.jp/help/termsofuse.html)に従って下さい。</ows:Abstract>
</ows:ServiceIdentification>
<Contents>
@minorua
minorua / OpenStreetMap.tsv
Last active January 31, 2017 21:14
[QGIS][TileLayerPlugin] a layer definition file for OpenStreetMap
#title credit serviceUrl yOriginTop zmin zmax xmin ymin xmax ymax
OpenStreetMap © OpenStreetMap contributors http://tile.openstreetmap.org/{z}/{x}/{y}.png 1 0 19
@minorua
minorua / backport.py
Created June 30, 2015 21:22
A script to backport latest translations to 2.8 branch
# -*- coding: utf-8 -*-
# A script to backport latest translations to 2.8 branch
# 2015-06-30
import codecs
from xml.dom import minidom
from xml.etree import ElementTree
class Message:
def __init__(self, index, context, source, translation, msg_type=None):