{"id":18322206,"url":"https://github.com/kikuchan/jmamap","last_synced_at":"2025-04-12T23:14:32.708Z","repository":{"id":57281165,"uuid":"342831501","full_name":"kikuchan/jmamap","owner":"kikuchan","description":"気象庁の地図データ（タイル情報）を取得するヘルパーライブラリです。","archived":false,"fork":false,"pushed_at":"2024-02-21T00:42:48.000Z","size":212,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T23:14:28.187Z","etag":null,"topics":["jma","openlayers","tile","vector-tile"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kikuchan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-27T10:39:57.000Z","updated_at":"2025-02-23T16:39:39.000Z","dependencies_parsed_at":"2024-01-16T02:01:12.343Z","dependency_job_id":"7b087d95-f3f0-4435-b3ae-3e7a62d3c704","html_url":"https://github.com/kikuchan/jmamap","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuchan%2Fjmamap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuchan%2Fjmamap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuchan%2Fjmamap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuchan%2Fjmamap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kikuchan","download_url":"https://codeload.github.com/kikuchan/jmamap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643007,"owners_count":21138355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jma","openlayers","tile","vector-tile"],"created_at":"2024-11-05T18:23:46.419Z","updated_at":"2025-04-12T23:14:32.684Z","avatar_url":"https://github.com/kikuchan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JMA MAP Loader\n\n## What is this?\n\nHelper functions to obtain tile information of map provided by [Japan Meteorological Agency](https://www.jma.go.jp/)\n\n気象庁の地図データを取得するヘルパーライブラリです。\n\nAdditionally, it also provides `JMALayer` layer constructor for OpenLayers.\n\nさらに OpenLayers 用のレイヤー作成関数 `JMALayer` を提供します。\n\n\n## How to install\n\n```\nnpm i jmamap\n```\n\n\n## How to use\n\n### Simply with OpenLayers\n```\nimport { JMALayer } from 'jmamap/ol';\n    :\nmap.addLayer(new JMALayer('base'));\nmap.addLayer(new JMALayer('raincloud'));\n```\n\n![image](https://user-images.githubusercontent.com/445223/179498842-e7dbd463-8ba5-408a-9a8c-1c520ebfc055.png)\n\nSee [examples/ol-jmalayer](https://github.com/kikuchan/jmamap/tree/main/examples/ol-jmalayer) for more details.\n\n\n### As an access helper library\n```\nimport { fetchTargetTimes } from 'jmamap';\n\nconst targetTimes = await fetchTargetTimes('raincloud');\n```\n\nとすると\n\n```\n[{\n  basetime: '20210227101000',\n  validtime: '20210227101000',\n  elements: [ 'hrpns', 'hrpns_nd' ],\n  tense: 'latest',\n  layerInfo: {\n    name: '雨雲の動き（高解像度降水ナウキャスト）',\n    category: '雨雲の動き',\n    requireTargetTimes: true,\n    layerType: 'tile',\n    attributions: '気象データ \u0026copy; Japan Meteorological Agency',\n    url: 'https://www.jma.go.jp/bosai/jmatile/data/nowc/20210227101000/none/20210227101000/surf/hrpns/{z}/{x}/{y}.png',\n    zoomLevels: [\n      3, 4, 5,  6,\n      7, 8, 9, 10\n    ],\n    minZoom: 3,\n    maxZoom: 10\n  },\n  basetimeInDate: 2021-02-27T10:10:00.000Z,\n  validtimeInDate: 2021-02-27T10:10:00.000Z\n}, ...]\n```\nのような出力が得られます。\n基本部分はサーバから取得できる `targetTimes.json` そのままですが、情報を追記して、さらに `basetime`, `validtime` 順に並べかえています。\n\n`layerInfo` の `url` の部分をそのままコピーして、例えば地理院地図の「ツール → その他 → 外部タイル」で貼り付けると、タイルをロードできます。\n\n\n大抵、最新の1件（もしくは直近の予報）が欲しいと思いますので、その際は\n```\nconst suitable = targetTimes.find(x =\u003e x.tense === 'latest') || (targetTimes.filter(x =\u003e x.tense != 'past') || [])[0]\n```\nなどのようにして、取り出してください。\n\n## List of supported layers\n\n|ID|LayerType|Category|Name|Format|\n|---|---|---|---|---|\n|`base`|tile|基本地図|標準|png|\n|`pale`|tile|基本地図|淡色地図(地名あり)|png|\n|`pale2`|tile|基本地図|淡色地図(地名なし)|png|\n|`green`|tile|基本地図|緑色地図|png|\n|`mask`|tile|基本地図|マスク|png|\n|`river`|tile|基本地図|河川|png|\n|`cities`|vector|基本地図|自治体名|geojson|\n|`himawari/jp/visibleray`|tile|ひまわり|可視画像（日本域）|jpg|\n|`himawari/jp/infrared`|tile|ひまわり|赤外画像（日本域）|jpg|\n|`himawari/jp/steam`|tile|ひまわり|水蒸気画像（日本域）|jpg|\n|`himawari/jp/truecolor`|tile|ひまわり|トゥルーカラー再現画像（日本域）|jpg|\n|`himawari/jp/cloudtop`|tile|ひまわり|雲頂強調画像（日本域）|jpg|\n|`himawari/fd/visibleray`|tile|ひまわり|可視画像（全球）|jpg|\n|`himawari/fd/infrared`|tile|ひまわり|赤外画像（全球）|jpg|\n|`himawari/fd/steam`|tile|ひまわり|水蒸気画像（全球）|jpg|\n|`himawari/fd/truecolor`|tile|ひまわり|トゥルーカラー再現画像（全球）|jpg|\n|`himawari/fd/cloudtop`|tile|ひまわり|雲頂強調画像（全球）|jpg|\n|`raincloud`|tile|雨雲の動き|雨雲の動き（高解像度降水ナウキャスト）|png|\n|`thunder`|tile|雨雲の動き|雷活動度（雷ナウキャスト）|png|\n|`tornado`|tile|雨雲の動き|竜巻発生確度（竜巻発生確度ナウキャスト）|png|\n|`amds-rain10m`|vector|雨雲の動き|アメダス１０分間雨量|geojson|\n|`liden`|vector|雨雲の動き|前５分間の雷の状況|geojson|\n|`raincloud-nodata`|vector|雨雲の動き|観測範囲外領域 [雨雲の動き（高解像度降水ナウキャスト）]|geojson|\n|`thunder-nodata`|vector|雨雲の動き|観測範囲外領域 [雷活動度（雷ナウキャスト）]|geojson|\n|`tornado-nodata`|vector|雨雲の動き|観測範囲外領域 [竜巻発生確度（竜巻発生確度ナウキャスト）]|geojson|\n|`linear-rainfall`|vector|雨雲の動き|線状降水帯|geojson|\n|`rainfall-1h`|tile|今後の雨|1時間降水量|png|\n|`rainfall-3h`|tile|今後の雨|3時間降水量|png|\n|`rainfall-24h`|tile|今後の雨|24時間降水量|png|\n|`weather`|tile|天気予報分布|天気|png|\n|`temperature`|tile|天気予報分布|気温|png|\n|`r3`|tile|天気予報分布|3時間降水量|png|\n|`s3`|tile|天気予報分布|3時間降雪量|png|\n|`max-temp`|tile|天気予報分布|日中の最高気温|png|\n|`min-temp`|tile|天気予報分布|朝の最低気温|png|\n|`temp-point`|vector|天気予報分布|気温|geojson|\n|`max-temp-point`|vector|天気予報分布|日中の最高気温|geojson|\n|`min-temp-point`|vector|天気予報分布|朝の最低気温|geojson|\n|`weather-nodata`|vector|天気予報分布|観測範囲外領域 [天気]|geojson|\n|`temperature-nodata`|vector|天気予報分布|観測範囲外領域 [気温]|geojson|\n|`r3-nodata`|vector|天気予報分布|観測範囲外領域 [3時間降水量]|geojson|\n|`s3-nodata`|vector|天気予報分布|観測範囲外領域 [3時間降雪量]|geojson|\n|`max-temp-nodata`|vector|天気予報分布|観測範囲外領域 [日中の最高気温]|geojson|\n|`min-temp-nodata`|vector|天気予報分布|観測範囲外領域 [朝の最低気温]|geojson|\n|`snow`|tile|現在の雪|積雪の深さ|png|\n|`snowfall-3h`|tile|現在の雪|3時間降雪量|png|\n|`snowfall-6h`|tile|現在の雪|6時間降雪量|png|\n|`snowfall-12h`|tile|現在の雪|12時間降雪量|png|\n|`snowfall-24h`|tile|現在の雪|24時間降雪量|png|\n|`snowfall-48h`|tile|現在の雪|48時間降雪量|png|\n|`snowfall-72h`|tile|現在の雪|72時間降雪量|png|\n|`ws`|tile|海上分布予報|風速|png|\n|`wavh`|tile|海上分布予報|波の高さ|png|\n|`vis`|tile|海上分布予報|視程|png|\n|`icing`|tile|海上分布予報|着氷の程度|png|\n|`shinsui1`|tile|危険度分布|洪水浸水想定区域（計画規模）|png|\n|`shinsui2`|tile|危険度分布|洪水浸水想定区域（想定最大規模）|png|\n|`landslide`|tile|危険度分布|土砂災害|png|\n|`inundation`|tile|危険度分布|浸水害|png|\n|`flood`|vector-tile|危険度分布|洪水害|pbf|\n\n\n## 注意事項・制限\n\n* 無保証です。\n* まだ全てのレイヤーには対応できていません。\n* たまに `tense` が `latest` を含まないデータもあります。（予報データのみの場合など）\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikuchan%2Fjmamap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkikuchan%2Fjmamap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikuchan%2Fjmamap/lists"}