LL2FERC 1.3.0

dotnet add package LL2FERC --version 1.3.0
NuGet\Install-Package LL2FERC -Version 1.3.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LL2FERC" Version="1.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LL2FERC --version 1.3.0
#r "nuget: LL2FERC, 1.3.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LL2FERC as a Cake Addin
#addin nuget:?package=LL2FERC&version=1.3.0

// Install LL2FERC as a Cake Tool
#tool nuget:?package=LL2FERC&version=1.3.0

Latitude and Longitude To Flinn-Engdahl Regions Code

Nuget Nuget GitHub last commit GitHub Release Date GitHub issues

緯度と経度からFlinn-Engdahl regions code、Flinn-Engdahl regions codeから日本語名称・英語名称への変換ができます。<br> お知らせ:コードのコメントは英語で書かれていますが、READMEは日本語で書かれています。

This library can convert from latitude and longitude to Flinn-Engdahl region codes, and from Flinn-Engdahl region codes to Japanese and English names.<br> Notice: The comments in the code are written in English, but the README is written in Japanese.

データ

コード:USGS Geoserve Regions Endpoint 取得:2023/04/29~4/30

日本語名称:気象庁防災情報XMLフォーマット 技術資料 個別コード表 取得ファイル:20221118

英語名称:Wikipedia - "Flinn-Engdahl regionalization" 閲覧:2023/05/10

インストール

  • NuGetパッケージマネージャーで"LL2FERC"で検索

  • PM> NuGet\Install-Package LL2FERC

  • > dotnet add package LL2FERC

使い方

(一部確認してないので動かないかもしれません)

メイン

//using LL2FERC;

double lat = 35.79;
double lon = 135.79;
int code = LL2FERC.GetCode(lat, lon);//コード

//コード->名称
string name_ja = LL2FERC.GetName_ja(code);//日本語名称
string name_en = LL2FERC.GetName_enUS(code);//英語名称

//緯度経度->名称
string name_ja = LL2FERC.GetName_ja(lat, lon);//日本語名称
string name_en = LL2FERC.GetName_enUS(lat, lon);//英語名称

using static LL2FERC.LL2FERC;とすることで以下のように省略できます。

int code = GetCode(lat, lon);//コード

元データリスト(上のコードで内部使用しているもの、readonly)のコピーの例(値を変えないなら参照でも可)(using static LL2FERC.Datas;で省略)

var codes = (int[,])LL2FERC.Datas.Codes.Clone();//元のコード一覧 
var nameList_ja = new Dictionary<int, string>(LL2FERC.Datas.NameList_ja);//日本語名称一覧
var nameList_en = new Dictionary<int, string>(LL2FERC.Datas.NameList_enUS);//英語名称一覧

ファイルから読み込む

var ff = new LL2FERC.FromFile("namelist_xx.csv");//namelist_ja.csvから名称リストを読み込みます。指定しない場合LL2FERC.FromFile.csvが読み込まれます(同梱していません)。
string name_xx = ff.GetName_File(code));

csvファイルの形式は以下です(レポジトリにあるnamelist_{language}.csvと同じ)。

code,name
1,(コード1の名称)
2,(コード2の名称)
...
757,(コード757の名称)

その他

  • レポジトリに緯度経度グリッドでのコードのcsvデータ(codes.csv)、名称データ(namelist_{language}.csv)があります。
  • 間違っているところ等あればIssuesなどで連絡してください。

貢献

言語を追加したい場合既存のものと同じように作成し、Pull Requestを作成してください(releaseブランチ以外で)。csvファイルを追加するだけでもかまいません。

更新履歴

v1.3.0

2024/03/29

  • 構造・変数名・メソッド名等を変更しました。確認してください。
  • ソースファイルを分割
  • 英語名称のハイフン部分が?になっていたので修正
  • ファイルを読み込んで言語を追加できるように
  • 変更に伴いREADMEの修正、追加

v1.2.0

2023/10/08

  • クラス名を変更しました。確認してください。
  • 緯度経度から名称(日本語・英語)の変換を追加

v1.1.1

2023/09/30

  • 変数名・メソッド名等を変更しました。確認してください。
  • コードから日本語名称の変換を、気象庁と同じ文字に(以前までは半角化などをしていた)
  • 変数名等コード・READMEの調整、コメント等の英文化

v1.1.0

2023/05/10

  • コードから名称(日本語・英語)の変換を追加

v1.0.0

2023/04/30

  • 緯度経度からコードへの変換を追加
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.0 86 3/29/2024
1.2.0 126 10/8/2023
1.1.1 117 9/30/2023
1.1.0 142 5/10/2023
1.0.0 130 4/30/2023

v1.3.0
- **構造・変数名・メソッド名等を変更しました。確認してください。**
- ソースファイルを分割
- 英語名称のハイフン部分が?になっていたので修正
- ファイルを読み込んで言語を追加できるように
- 変更に伴いREADMEの修正、追加