Skip to content

Instantly share code, notes, and snippets.

View typebrook's full-sized avatar
💭
Adapting new job

Hsieh Chin Fan typebrook

💭
Adapting new job
View GitHub Profile
@typebrook
typebrook / wmts.xml
Last active October 20, 2020 05:56
Test for NLSC WMTS: layer LiDAR2019 #wmts #nlsc #lidar
<?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 / boundary.geojson
Created November 7, 2020 04:29
GeoJSON file for Taiwan boundary #taiwan #data #geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@typebrook
typebrook / ExpandableTextView.kt
Last active June 27, 2022 04:39
Simple Android Expandable TextView #android #textview
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 / Makefile
Last active December 23, 2024 15:37
台電電桿座標 TWD67 -> WGS84 #taipower #crs #osm #import
.ONESHELL:
# Dataset: https://data.gov.tw/dataset/33305
DATASET_URL = http://data.taipower.com.tw/opendata/apply/file/d077006/台灣電力公司_電桿桿號及座標資料.zip
# Ref: https://gist.github.com/mutolisp/20b8d11888775932ab7188769e9e8f9d
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"
# The raw dataset from Taipower company
dataset.zip:
@typebrook
typebrook / Makefile
Last active July 30, 2022 23:55
Command to generate Cesium terrain tiles with ctb-tile #cesium #tile #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 February 28, 2021 16:07
Get highest peaks in each section of Taipower Coordinate System (8000m x 5000m) #mapstew #taipower
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 / .gitignore
Last active November 28, 2025 11:48
匯入臺中市開放門牌資料 #osm #open_data #perl #awk #address #taichung #gov
*.bak
@typebrook
typebrook / backup.encrypted
Created March 27, 2021 12:47
My backup SSH key #ssh #backup
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 / DownloadProgressLiveData.kt
Created April 19, 2021 15:03 — forked from FhdAlotaibi/DownloadProgressLiveData.kt
Observe Download manager progress using LiveData and Coroutine #android #kotlin #livedata
data class DownloadItem(
val bytesDownloadedSoFar: Long = -1,
val totalSizeBytes: Long = -1,
val status: Int,
val uri: String
)
class DownloadProgressLiveData(private val activity: Activity) :
LiveData<List<DownloadItem>>(),
CoroutineScope {
@typebrook
typebrook / Makefile
Last active July 30, 2022 23:54
Remove elements from Mapbox Vector Tiles #protobuf #python #tilemaker #pbf #mvt
pbf:
curl -O https://typebrook.github.io/mapstew/tiles/13/6861/3507.pbf
diff:
curl -O https://download.openstreetmap.fr/replication/asia/minute/004/508/867.osc.gz