This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| /** | |
| * PBF(MVT) -> GeoJSON | |
| * Usage: node pbf2geojson.js /path/to/{z}/{x}/{y}.pbf > out.geojson | |
| */ | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const zlib = require('zlib'); | |
| const { VectorTile } = require('@mapbox/vector-tile'); | |
| const Pbf = require('pbf'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -ex | |
| # 引数チェック | |
| if [ $# -ne 2 ]; then | |
| echo "Usage: $0 <S3_BUCKET> <UPLOAD_DIR>" | |
| exit 1 | |
| fi | |
| S3_BUCKET="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| WORKDIR="gsm_gl" | |
| SRC_FILENAME="Z__C_RJTD_20171205000000_GSM_GPV_Rgl_FD0006_grib2.bin" | |
| DST_FILENAME="jms-sample.grib2" | |
| # 1. zipファイルをダウンロード | |
| curl -O https://www.data.jma.go.jp/developer/gpv_sample/gsm_gl.zip | |
| # 2. unzip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -ex | |
| # --- NOTE: S3の設定 --- | |
| # aws configure set default.s3.max_concurrent_requests 100 を指定することで、 | |
| # S3へのアップロードを並列で行うことができます。必要に応じてデフォルト値を変更してください。 | |
| # 1番目の引数がなければエラー | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <UPLOAD_DIR> <S3_BUCKET_URL>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ==== 設定 ==== | |
| PORT=8000 | |
| DIRECTORY="./tiles" # 配信するディレクトリ(必要に応じて変更) | |
| # 一時ファイルを作成(macOS などの場合) | |
| PYTHON_SERVER=$(mktemp -t pbf_server.py.XXXXXX) | |
| if [ -z "$PYTHON_SERVER" ]; then | |
| echo "一時ファイルの作成に失敗しました" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Node.js 用サンプルコード | |
| * | |
| * 1) GeoJSON の全フィーチャから BBox(西端, 南端, 東端, 北端)を計算 | |
| * 2) minzoom~maxzoom を指定 | |
| * 3) そのズームレベルにおいて、BBox と交差するタイル (x, y) だけをループ | |
| * 4) タイルごとに PBF 生成 → `./output/z/x/y.pbf` へ保存 | |
| * | |
| * (例示のため、点データのみ想定) | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # -------------------------------------------------- | |
| # run_wgrib2.sh | |
| # | |
| # このスクリプトは、指定された GRIB2 ファイルを | |
| # Docker コンテナ内で wgrib2 を使用して処理します。 | |
| # | |
| # 使用方法: | |
| # ./run_wgrib2.sh /path/to/your/file.bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ベースイメージとして Ubuntu 22.04 を使用 | |
| FROM ubuntu:22.04 | |
| # 非対話モードでの APT 使用を設定 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # 必要なパッケージをインストール | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| build-essential \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # スクリプト名: check_and_rename_attribute.sh | |
| # 説明: 指定された属性名がシェープファイル内に存在するかを確認し、存在しない場合はユーザーに選択させて属性をリネームし、新しいシェープファイルを作成する。 | |
| # 修正したファイルを作成した後、元のファイルを削除するかをユーザーに確認する。 | |
| # エンコーディングの設定 | |
| export LC_ALL=en_US.UTF-8 | |
| export LANG=en_US.UTF-8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -ex | |
| # 引数のチェック | |
| if [ $# -ne 2 ]; then | |
| echo "エラー: 必要な引数が指定されていません。" >&2 | |
| echo "使用方法: $0 <カラーテーブルファイル: 例 color_table.txt> <対象フィールド名: 例 Max_Rank>" >&2 | |
| exit 1 | |
| fi |
NewerOlder