PetaBencana
English
English
  • Introduction
  • General
    • Authentication
    • Versioning
    • Rate Limits
    • CORS
    • HTTPS
    • Coordinates
    • Error Codes
    • Content Types
    • Examples
    • Supported Area
    • Supported Hazards
  • Open API
    • Cards
    • Feeds
    • Flood Gauges
    • Flooded Area
    • Flooded Area/Archive
    • Flooded Area/Timeseries
    • Infrastructure
    • Crowdsourced Reports
    • Crowdsourced Reports/Archive
    • Crowdsourced Reports/Timeseries
    • Stats
      • Stats - Reports Summary
      • Stats - Flooded RWs Summary
      • Stats - Flooded Regions Summary
  • Authenticated API
    • Cards
    • Feeds
Powered by GitBook
On this page
  • Request Format
  • GET /infrastructure/:type

Was this helpful?

  1. Open API

Infrastructure

Locations of local infrastructure including flood gates, pumps and waterways.

Currently this data is only available for Jakarta.

Request Format

URL Parameter

Description

Format

Required

type

What type of infrastructure do we wish to list? (one of floodgates, pumps, waterways)

String

Yes

Query Parameter

Description

Format

Required

admin

Which province do we wish to return infrastructure for? (currently available for ID-JK)

String

No

format

Which format should we return results in? (one of json, defaults to json)

String

No

geoformat

What format should geographic results use (one of topojson, geojson defaults to topojson)

String

No

GET /infrastructure/:type

Return a list of pumps in Jakarta.

curl "https://data.petabencana.id/infrastructure/pumps?admin=ID-JK"

Results are as follows:

{
  "statusCode": 200,
  "result": {
    "type": "Topology",
    "objects": {
      "output": {
        "type": "GeometryCollection",
        "geometries": [
          {
            "type": "Point",
            "properties": {
              "name": "PA Marina"
            },
            "coordinates": [
              7164,
              7352,
              0
            ]
          },
          {
            "type": "Point",
            "properties": {
              "name": "Pompa Waduk Setia Budi Barat"
            },
            "coordinates": [
              5312,
              5077,
              0
            ]
          },
          // etc. etc. //
          {
            "type": "Point",
            "properties": {
              "name": "Pompa UP Senen"
            },
            "coordinates": [
              6143,
              6544,
              0
            ]
          }
        ]
      }
    },
    "arcs": [],
    "transform": {
      "scale": [
        0.000020651319451945148,
        0.000020217245084508508
      ],
      "translate": [
        106.7188310623,
        -6.3060956581
      ]
    },
    "bbox": [
      106.7188310623,
      -6.3060956581,
      106.9253236055,
      -6.1039434245
    ]
  }
}
PreviousFlooded Area/TimeseriesNextCrowdsourced Reports

Last updated 4 years ago

Was this helpful?