Skip to content

Instantly share code, notes, and snippets.

View typebrook's full-sized avatar

Hsieh Chin Fan typebrook

View GitHub Profile
@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 / boundary.geojson
Created November 7, 2020 04:29
GeoJSON file for Taiwan boundary #taiwan #data #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 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 / arcgis.html
Last active September 29, 2020 12:32 — forked from JoeThunyathep/index.html
Index file for Cesium NYC application #cesium #3d #arcgis #nlsc #citygml
<!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 March 10, 2021 07:15
Remove changeset from cmi3j89d9o #osm #editor
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
@typebrook
typebrook / Makefile
Last active June 11, 2022 04:56
更新林務局通訊點資訊 #osm #tagging #rudymap #mobile
.ONESHELL:
all: changes.osc
clean:
rm *.osm *.osc
OVERPASS_API := https://overpass.nchc.org.tw/api/interpreter
TAIWAN_BBOX := 20.72799,118.1036,26.60305,122.9312
@typebrook
typebrook / README.md
Last active February 25, 2023 11:32
A simple script to upload OsmChange file #osm #changeset #script

Upload OsmChange file with script

Usage

# By default, changeset would be uploaded to test server: 
# https://master.apis.dev.openstreetmap.org
./osm.api.changeset.commit <OSC FILE>

# Use --serious to upload changeset to normal OSM server
./osm.api.changeset.commit --serious <OSC FILE>
@typebrook
typebrook / Makefile
Last active June 11, 2022 04:57
Add OSM ID into Wikidata #wikidata #osm #script #wip
clean:
rm *.list *.osm *.osc
# P31=屬於 Q7930614=中華民國村里 P5020=中華民國戶政資料代碼
define quest
SELECT DISTINCT ?village ?villageLabel
WHERE {
?village wdt:P31 wd:Q7930614.
MINUS { ?village wdt:402 [] } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "zh" }
@typebrook
typebrook / Makefile
Last active July 30, 2022 23:58
Update OSM villages with wikidata #osm #wikidata #village #script
all: final.osc
clean:
rm *.list *.osm *.osc
# P31=屬於 Q7930614=中華民國村里 P5020=中華民國戶政資料代碼
define quest
SELECT DISTINCT ?village ?ref
WHERE {
?village wdt:P31 wd:Q7930614.
@typebrook
typebrook / google.html
Last active August 3, 2020 06:05
Examples for My talk in Coscup 2020 #coscup2020 #map
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenStreetMap with Google Maps v3 API</title>
<style type="text/css">
html, body, #map {
height: 100%;