Mapakalamidad
Tagalog
Tagalog
  • Pagpapakilala
  • Pangkalahatan
    • Pagpapatunay
    • Pag-bebersyon
    • Rate Limits
    • CORS
    • HTTPS
    • Coordinates
    • Error Codes
    • Mga Uri ng Nilalaman
    • Mga Halimbawa
  • API
    • Cards
    • Cities
    • Feeds
    • Flood Gauges
    • Baha
    • Baha/Archive
    • Baha/Timeseries
    • Imprastraktura
    • Ulat
    • Ulat/Archive
    • Reports/Timeseries
    • Stats
      • Stats - Reports Summary
      • Stats - Flooded RWs Summary
      • Stats - Flooded Regions Summary
Powered by GitBook
On this page
  • Request Format
  • KUMUHA/cities

Was this helpful?

  1. API

Cities

Sinusuportahan ng MapaKalamidad ang maraming mga lungsod na tinutukoy ng isang pangheograpiyang lugar. Ibabalik ng endpoint na ito ang mga sinusuportahang lungsod kasama ang kani-kanilang mga hangganang pangheograpiya.

Request Format

Query Parameter

Paglalarawan

Format

Required

format

Aling format ang dapat nating ibalik ang mga resulta? (isang json, babalik sajson)

String

No

geoformat

Anong format ang dapat gamitin ng geographic results o ang resulta sa heyograpiya (isang topojson, geojson babalik sa topojson)

String

No

KUMUHA/cities

Ibalik ang lahat ng mga lungsod sa format na default (topojson).

curl "https://data.petabencana.id/cities"

Ang mga resulta ay ang mga sumusunod:

{
  "statusCode": 200,
  "result": {
    "type": "Topology",
    "objects": {
      "output": {
        "type": "GeometryCollection",
        "geometries": [
          {
            "type": "Polygon",
            "properties": {
              "code": "jbd",
              "name": "Jabodetabek"
            },
            "arcs": [
              [
                0
              ]
            ]
          },
          {
            "type": "Polygon",
            "properties": {
              "code": "bdg",
              "name": "Bandung"
            },
            "arcs": [
              [
                1
              ]
            ]
          },
          {
            "type": "Polygon",
            "properties": {
              "code": "sby",
              "name": "Surabaya"
            },
            "arcs": [
              [
                2
              ]
            ]
          }
        ]
      }
    },
    "arcs": [
      [
        [
          0,
          4891
        ],
        [
          1061,
          0
        ],
        [
          0,
          5108
        ],
        [
          -1061,
          0
        ],
        [
          0,
          -5108
        ]
      ],
      [
        [
          1357,
          2305
        ],
        [
          857,
          0
        ],
        [
          0,
          2976
        ],
        [
          -857,
          0
        ],
        [
          0,
          -2976
        ]
      ],
      [
        [
          9031,
          0
        ],
        [
          968,
          0
        ],
        [
          0,
          3207
        ],
        [
          -968,
          0
        ],
        [
          0,
          -3207
        ]
      ]
    ],
    "transform": {
      "scale": [
        0.0006552455245524552,
        0.000167006700670067
      ],
      "translate": [
        106.48,
        -7.5499
      ]
    },
    "bbox": [
      106.48,
      -7.5499,
      113.0318,
      -5.88
    ]
  }
}

Ibalik ang lahat ng mga lungsod sa format na default (geojson).

curl "https://data.petabencana.id/cities?geoformat=geojson"

Ang mga resulta ay ang mga sumusunod:

{
  "statusCode": 200,
  "result": {
    "type": "FeatureCollection",
    "features": [
      {
        "type": "Feature",
        "geometry": {
          "type": "Polygon",
          "coordinates": [
            [
              [
                106.48,
                -6.733
              ],
              [
                107.175,
                -6.733
              ],
              [
                107.175,
                -5.88
              ],
              [
                106.48,
                -5.88
              ],
              [
                106.48,
                -6.733
              ]
            ]
          ]
        },
        "properties": {
          "code": "jbd",
          "name": "Jabodetabek"
        }
      },
      {
        "type": "Feature",
        "geometry": {
          "type": "Polygon",
          "coordinates": [
            [
              [
                107.369,
                -7.165
              ],
              [
                107.931,
                -7.165
              ],
              [
                107.931,
                -6.668
              ],
              [
                107.369,
                -6.668
              ],
              [
                107.369,
                -7.165
              ]
            ]
          ]
        },
        "properties": {
          "code": "bdg",
          "name": "Bandung"
        }
      },
      {
        "type": "Feature",
        "geometry": {
          "type": "Polygon",
          "coordinates": [
            [
              [
                112.3975,
                -7.5499
              ],
              [
                113.0318,
                -7.5499
              ],
              [
                113.0318,
                -7.0143
              ],
              [
                112.3975,
                -7.0143
              ],
              [
                112.3975,
                -7.5499
              ]
            ]
          ]
        },
        "properties": {
          "code": "sby",
          "name": "Surabaya"
        }
      }
    ]
  }
}
PreviousCardsNextFeeds

Last updated 4 years ago

Was this helpful?