Power Lines API

アクセス & 制限Public, no key needed · Heavy▾

誰でも利用可能です。プロファイルからの無料APIキーは制限を引き上げます: X-API-Key ヘッダー、またはとして api_key= アドレスで。

5分時間日
キーなし20120500
キーを使用して604002,000

Each 100 square km of area counts as one request, so a 10 km square is 1 and a 30 km square is 9.

プロフィールページで無料キーを作成するにはログインしてください。

すべての回答には X-RateLimit-Remaining and X-RateLimit-Reset制限を超えると、エラーになります 429 〜と retry_after 秒単位。拒否されたリクエストはカウントされません。

GET キーは不要 JSONまたはバイナリファイル 最大30km四方 2-bit classes and pylon list 1時間あたりアドレスあたり60リクエスト

上空の電力線が点の周辺四角形に渡る場所、および送電線上のすべての鉄塔とその高さ、同じデータ 電力線マップ 描画されます。ウェブページやスクリプトの場合はJSONとして、または飛行コンピューターや地上局が運べる小さなバイナリファイルとしてリクエストしてください。

GEThttps://www.altimetercloud.com/api/power/lat lon size_km

パラメータ

パラメータ意味
lat, lon矩形の中央、10進度数 (lng 受け入れられます)
size_km正方形の辺の長さ (km 単位)。0 より大きく 30 以下。指定しない場合は 1。10 km を超える正方形はファイルのみとして提供されます。
formatオプション。 json (デフォルト): グリッドをbase64として、パイロンをリストとします。 bin: グリッドをファイルとして。 pylons: ファイルとしての鉄塔。
compressオプション。 none (デフォルト), zlib または lzma, と同様に 内陸水路API.
classesオプション。保持するラインクラス(例: 1; the other classes come back as 0. Left out, all.
downloadOptional. 1 makes a browser save a file answer.

The lines

ClassWhatOpenStreetMap
0Nothing
1Transmission linepower=line
2Distribution linepower=minor_line
3Spare, not used yet

Any cell a line crosses at all takes its class, so each line comes back as an unbroken band of cells however it runs; where the two meet, transmission is kept. Lines mapped as underground or underwater are left out. The grid is the 内陸水路APIの: 1/12000度のセル, 行0が北端、列0が西端, 2ビット/セル、4セル/バイト, 最も高いビットの最初のセル、各行は全バイトで始まります。

The pylons

Every pylon (power=tower) in the square, nearest the middle first, with its height in metres, the voltage of the line it carries in kV, and whether the height is estimated. Where OpenStreetMap records a pylon's height, that is used. Most have none, so the height is estimated from the voltage: 50 m for 380 kV and up, 45 m for 220 kV and up, 30 m for 110 kV and up, 22 m for 60 kV and up, 15 m for 30 kV and up, 12 m below that, and 30 m where the voltage is not known either. The wires hang from the pylon tops and sag lower between them, so a pylon's height is the most its wires can reach.

JSONの答え

{
  "success": true,
  "lat", "lon", "size_km", "bits",           bits is 2
  "rows", "cols", "cells", "row_bytes",      the grid, as above
  "cells_per_degree", "north_edge_cell", "west_edge_cell",
  "north", "south", "west", "east",
  "line_pct", "class_pct", "classes", "kept",
  "coverage_pct",
  "data_b64",                                the grid rows, row 0 first
  "pylon_count",
  "pylons": [ { "lat", "lon", "distance_m",
                "height_m", "kv", "height_estimated" } ],
  "credits": { "power", "licence", "data_licence", "full" }
}

The binary files

format=bin: the grid, with the same 32 byte header as the water, roads and tree canopy files, named ACPW, version 1, 2 bits a cell. format=pylons: a 32 byte header then 16 byte records, little endian, nearest the middle first.

Header byteTypeValue
0char[4]ACPY
4uint8Version, 1
5uint8レコードサイズ、16
8uint32記録
12int32正方形の中心、緯度 × 107
16int32正方形の中央、経度 × 107
20uint32正方形の辺、メートル
Record byteタイプ値
0int32緯度 × 107
4int32経度 × 107
8uint16高さ、デシメートル
10uint16その回線の電圧、kV(0は不明)
12uint160
14uint8タイプ: 1 pylon
15uint8Flags: bit 0, height estimated from the voltage; bit 1, voltage not known either

例

https://www.altimetercloud.com/api/power/?lat=54.35&lon=-2.95&size_km=3
https://www.altimetercloud.com/api/power/?lat=54.35&lon=-2.95&size_km=10&format=bin&compress=zlib
https://www.altimetercloud.com/api/power/?lat=54.35&lon=-2.95&size_km=10&format=pylons

ファイルの読み取り

グリッドは正確に次のように読み取られます 内陸水路APIの2ビットグリッド: (row[i >> 2] >> (6 - 2 * (i & 3))) & 3 列用 i. パイロン:

// C
typedef struct __attribute__((packed)) {
  int32_t  lat_e7, lon_e7;
  uint16_t height_dm, kv, reserved;
  uint8_t  type, flags;                  // flags bit 0: height estimated
} Pylon;
# Python
import requests, struct
f = requests.get('https://www.altimetercloud.com/api/power/',
                 params={'lat': 54.35, 'lon': -2.95, 'size_km': 10, 'format': 'pylons'}).content
n = struct.unpack('<I', f[8:12])[0]
for i in range(n):
    la, lo, h, kv, _, typ, fl = struct.unpack('<iiHHHBB', f[32 + 16 * i: 48 + 16 * i])
    print(la / 1e7, lo / 1e7, h / 10, kv, 'estimated' if fl & 1 else 'mapped')

エラー

コード意味
412パラメーターが不足しているか無効です。四角形が 30 km を超えています。または JSON が 10 km を超えて要求されました。
413正方形のセルが多すぎます。これは極に非常に近い場合のみ発生します
429アドレスからのリクエストが多すぎるか、まだ処理中です
501要求された圧縮は今のところ利用できません

試してみる

ザ Power Lines Map has a download panel: move the map so the cross sits on your launch site, choose the lines grid or the pylons, and it saves the file from this API.

Power lines data credits

Contains OpenStreetMap data © OpenStreetMap contributors, available under the Open Database Licence (ODbL), through the regional extracts published by Geofabrik. The lines are reduced here to a class a cell, and pylon heights are estimated from their line's voltage where none is mapped, which changes them: this is not the original data.

Licence of this data. Because it contains OpenStreetMap data, the data this API gives out is made available under the Open Database License (ODbL) 1.0. You may use it freely, commercially too, as long as you credit it as above and share any database you make from it under the same licence.

AltimeterCloud に謝辞を表す

無料で使用できます。使用する場合 this API, or anything made from the answers, in a commercial product or service, credit AltimeterCloud with a link to www.altimetercloud.com 使用時点:データが表示されている画面、ページ、または印刷物上など “Data from AltimeterCloud.com”. このページにリストされている、データ自体のソースが要求するいかなるクレジットも同様に適用されます。