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 그리고 X-RateLimit-Reset제한을 초과하면 오류 응답 429 포함 retry_after 초 단위입니다. 거부된 요청은 계산되지 않습니다.

GET 키가 필요 없음 JSON 또는 이진 파일 최대 30 km² 2비트 클래스 및 철탑 목록 시간당 주소당 60개 요청

표준 공중 배전선이 한 지점 주변의 사각형에 걸쳐 있고 높이가 있는 모든 철탑이 있는 위치, 같은 데이터 전력선 지도 드로우. 웹 페이지 또는 스크립트의 JSON으로 요청하거나, 비행 컴퓨터 또는 지상국이 운반할 수 있는 작은 바이너리 파일로 요청하십시오.

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

매개변수

파라미터의미
lat, lon정사각형의 중앙, 십진도 (lng 도 허용됨)
size_km정사각형의 한 변의 길이(km)는 0보다 크고 최대 30입니다. 생략하면 1입니다. 10km 이상의 정사각형은 파일로만 제공됩니다.
format선택 사항. json (기본값): base64의 그리드와 목록의 파일론입니다. bin: 그리드를 파일로. pylons: 파일로 기둥들을 저장합니다.
compress선택 사항. none (기본값), zlib 또는 lzma, 에서처럼 내륙 수역 API.
classes선택 사항. 유지할 line 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비트 1셀, 4셀 1바이트, 가장 높은 비트의 첫 번째 셀, 각 행은 전체 바이트에서 시작합니다.

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
4uint8버전, 1
5uint8레코드 크기, 16
8uint32기록
12int32정사각형의 중심, 위도 × 107
16int32사각형의 중앙, 경도 × 107
20uint32정사각형의 변, 미터
Record byte유형값
0int32위도 × 107
4int32Longitude × 107
8uint16높이, 데시미터
10uint16선의 전압, kV (0은 미지수)
12uint160
14uint8유형: 1 파일론
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매개변수가 누락되었거나 유효하지 않음, 사각형이 30km를 초과, 또는 10km를 초과한 JSON 요청됨
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”. 이 페이지에 나열된 데이터의 출처가 요청하는 모든 출처 표시가 적용됩니다.