Skip to content

Instantly share code, notes, and snippets.

Avatar

Hsieh Chin Fan typebrook

View GitHub Profile
@typebrook
typebrook / backup.encrypted
Created Mar 27, 2021
My backup SSH key #ssh #backup
View backup.encrypted
U2FsdGVkX181R2xhLwRJruW+HBO9lZ9YlYXefHKznUVZcGr+EmOnnpkgCBlTIivC
5DFf+CPCx926tPtEYehrOilMyjcqJwZFepqxqgnpYcIq7KCNPjXqkEN3r/rMWIfw
2tpW8j74DHyrY3/qJLNp5MPwto6WUDLy4ApbaRsE4CN+H5otUKW8Dhbom6fP8yr7
thI4F8tPUum5sK8XNslvHVPNztZxF1BCX0hs7Yl63MLS4peCNidaLF+YhrbZpV1v
TuapIbaR1u5A2mWxcahrlPUN/px0+BM0HEl+AhoD0NKhgzbCxV89HC4qdOzYqoWG
JuBFyDxQNLiB55NxSWGJbts7BtNqSLZRAUWnh7tyMvWbUPbqnSTP504iF1Ds9aCO
AMYSK2je/IQZsm8s5q/KOo9VtRbs7Icm7uR/zBdUXLBWhSGoXkcpZUxfYnzkmXL5
Dl+1Q6q5WHZTgV++uiemBVBzWlFD2CQFj0XXEd3Ir0jabfYjQB7sg9J6SlNZUVtV
qVPRhzFNxP9bZL0Aqc2bklHEJvOlJC89xrM/Zkc5vEb+OLDfkw7qsekLcImwk7CS
JJpplU2B4P30YOTtA3c53G/3zHvv71QjmXXtWrmh51hwJYDmYqitBczSWnE4ac/i
@typebrook
typebrook / .gitignore
Last active Mar 23, 2021
匯入臺中市開放門牌資料 #osm #open_data #perl #awk
@typebrook
typebrook / Makefile
Last active Feb 28, 2021
Get highest peaks in each section of Taipower Coordinate System (8000m x 5000m) #mapstew #taipower
View Makefile
all: peaks.db
taiwan-latest.osm.pbf:
curl -O http://download.geofabrik.de/asia/$@
TEMP_FILE := temp.o5m
peaks.o5m: taiwan-latest.osm.pbf
osmconvert $< --drop-ways --drop-relations -o=$(TEMP_FILE)
osmfilter $(TEMP_FILE) --keep=natural=peak -o=$@
rm $(TEMP_FILE)
@typebrook
typebrook / Makefile
Last active Jan 22, 2021
Command to generate Cesium terrain tiles with ctb-tile #cesium #tile #makefile
View Makefile
# Check command ctb-tile at
# https://github.com/geo-data/cesium-terrain-builder
# https://github.com/tum-gis/cesium-terrain-builder-docker
,
.ONESHELL:
ZIP_URL = http://dtm.moi.gov.tw/不分幅_全台及澎湖.zip
DOCKER_IMAGE = "tumgis/ctb-quantized-mesh:latest"
data.zip:
@typebrook
typebrook / Makefile
Last active Jan 17, 2021
台電電桿座標 TWD67 -> WGS84 #taipower #crs #script
View Makefile
.ONESHELL:
# Dataset: https://data.gov.tw/dataset/33305
ZIP_URL = http://data.taipower.com.tw/opendata/apply/file/d077006/台灣電力公司_電桿桿號及座標資料.zip
PROJ_PARAMS_TWD67 = "+proj=tmerc +lat_0=0 +lon_0=121 +k=0.9999 +x_0=250000 +y_0=0 +ellps=aust_SA +towgs84=-750.739,-359.515,-180.510,0.00003863,0.00001721,0.00000197,0.99998180 +units=m +no_defs"
data.zip:
<<<"$(ZIP_URL)" perl -lpe 's/([^A-Za-z0-9.\/:])/sprintf("%%%02X", ord($$1))/seg' |\
xargs curl -Lo $@
@typebrook
typebrook / ExpandableTextView.kt
Last active Nov 11, 2020
Simple Android Expandable TextView #android #textview
View ExpandableTextView.kt
package com.geothings.geobingan.ui
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.animation.ValueAnimator
import android.content.Context
import android.graphics.Color
import android.text.Spannable
import android.text.SpannableStringBuilder
import android.text.style.ForegroundColorSpan
@typebrook
typebrook / boundary.geojson
Created Nov 7, 2020
Taiwan boundary #taiwan #data #geojson
View boundary.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@typebrook
typebrook / wmts.xml
Last active Oct 20, 2020
Test for NLSC WMTS: layer LiDAR2019 #wmts #nlsc #lidar
View wmts.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Capabilities 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" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
<ows:ServiceIdentification>
<ows:Title>Taiwan MAP Service</ows:Title>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
</ows:ServiceIdentification>
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
@typebrook
typebrook / arcgis.html
Last active Sep 29, 2020 — forked from JoeThunyathep/index.html
Index file for Cesium NYC application #cesium #3d #arcgis #nlsc #citygml
View arcgis.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="initial-scale=1,maximum-scale=1,user-scalable=no"
/>
<title>Intro to SceneLayer | Sample | ArcGIS API for JavaScript 4.16</title>
<style>
@typebrook
typebrook / Makefile
Last active Mar 10, 2021
Remove changeset from cmi3j89d9o #osm #editor
View Makefile
all: final.osc
clean:
rm *.list *.osm *.osc
#OVERPASS_API := https://overpass-api.de/api/interpreter
OVERPASS_API := https://overpass.nchc.org.tw/api/interpreter
TAIWAN_BBOX := 20.72799,118.1036,26.60305,122.9312
USER := cmi3j89d9o