Skip to content

MoriiYuto/encoder-shapefile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

日本語English

シェープファイル・エンコーダー

国際的にはUTF8を標準の文字エンコードとして取り扱う動きを見せている。しかし、日本の行政が公表するシェープファイルは、専らシフトJISでエンコードされている。そのままのシェープファイルをGISソフトに読み込むと文字化けする可能性が有る。これを回避すべく、この企画は各シェープファイルにコードページファイルを追加するバッシュ/パワーシェル/コマンドプロンプトのスクリプトを提供する。

目次

スクリプト一覧

言語 上書許可 上書禁止
バッシュ encoder.sh encoder.sh
パワーシェル encoder.ps1 encoder.ps1
コマンド・プロンプト encoder.bat encoder.bat

実行方法

以下の命令文で最新版のスクリプトを実行できる。

  • バッシュ(上書許可):

    curl -s "https://raw.githubusercontent.com/s2312611/encoder-shapefile/default/source/overwrite/encoder.sh" | bash
  • バッシュ(上書禁止):

    curl -s "https://raw.githubusercontent.com/s2312611/encoder-shapefile/default/source/preserve/encoder.sh" | bash
  • パワーシェル(上書許可):

    Invoke-RestMethod -Uri "https://raw.githubusercontent.com/s2312611/encoder-shapefile/default/source/overwrite/encoder.ps1" | Invoke-Expression
  • パワーシェル(上書禁止):

    Invoke-RestMethod -Uri "https://raw.githubusercontent.com/s2312611/encoder-shapefile/default/source/preserve/encoder.ps1" | Invoke-Expression
  • コマンド・プロンプト:ダウンロードしてダブルクリック。

Shapefile Encoder

We are internationally moving toward UTF-8 as the standard character encoding. Yet, shapefiles published by Japanese government agencies are encoded exclusively in Shift JIS. If GIS software loads such shapefiles, text may become garbled. To prevent it, this project provides Bash/PowerShell scripts that add a code page file to each shapefile.

Table of Contents

List of Scripts

Language Overwrite Preserve
Bash encoder.sh encoder.sh
PowerShell encoder.ps1 encoder.ps1
Command Prompt encoder.bat encoder.bat

How to Use

Apply the latest script using the following commands.

  • Bash (overwriting):

    curl -s "https://raw.githubusercontent.com/s2312611/encoder-shapefile/default/source/overwrite/encoder.sh" | bash
  • Bash (preserving):

    curl -s "https://raw.githubusercontent.com/s2312611/encoder-shapefile/default/source/preserve/encoder.sh" | bash
  • PowerShell (overwriting):

    Invoke-RestMethod -Uri "https://raw.githubusercontent.com/s2312611/encoder-shapefile/default/source/overwrite/encoder.ps1" | Invoke-Expression
  • PowerShell (preserving)

    Invoke-RestMethod -Uri "https://raw.githubusercontent.com/s2312611/encoder-shapefile/default/source/preserve/encoder.ps1" | Invoke-Expression
  • Command Prompt: download and double-click it.