J-SHIS | Japan Seismic Hazard Information Station

submenu Sitemap Contact Us J-SHIS 地震ハザードステーション
Start J-SHIS Maps
その他

Averaged hazard information API

This API provides mesh information on averaged hazard.

Version

1.0.0

Request URL

https://www.j-shis.bosai.go.jp/map/api/avghzd/version/meshinfo.format?meshcode=meshcode&options
https://www.j-shis.bosai.go.jp/map/api/meshcode/avghzd/version/meshinfo.format?options
https://www.j-shis.bosai.go.jp/map/api/avghzd/version/meshinfo.format?position=position&epsg=epsg&options

Table of contents

Request

– URL
– By Mesh code
– By Longitude and Latitude
– Parameter

Response

– Status code
– Normal case
– GeoJSON format
– GML format
– Error case
– Error classification code
– GeoJSON format
– GML format

Request

URL

There are two ways that you can specify search position, either by longitude and latitude or by the mesh code. In the URL,bold characters indicate a request parameter; superscript number corresponds to the No. in parameter list.

By Mesh code
https://www.j-shis.bosai.go.jp/map/api/avghzd/version1/meshinfo.format2?meshcode=meshcode3&options6
https://www.j-shis.bosai.go.jp/map/api/meshcode3/avghzd/version1/meshinfo.format2?options6
By Longitude and Latitude
https://www.j-shis.bosai.go.jp/map/api/avghzd/version1/meshinfo.format2?position=position4&epsg=epsg5&options6
Parameters

Request parameters of the API are as follows. The parameters are case-sensitive.

No Parameters Dispensability Input values and Description
1 version Required Version code

  • Version1…V1
  • Version2…V2
  • Version3…V3
  • Version4…V4
  • Version5…V5
  • Version6…V6
  • Version7…V7
  • Version8…V8

Refer to a list of version codes for details.

2 format Required Response format

  • GeoJSON format…geojson
  • GML format…gml
3 meshcode Conditional 250m mesh code
Refer to the Quarter Grid Square definition for more information.

Note) Request fails if the “epsg” or “position” parameter is specified with this parameter.

4 position Conditional Longitude and Latitude are separated by a comma.
The coordinates are restricted in the following regions.

  • 122.0≦Longitude≦154.0
  • 20.0≦Latitude≦46.0

Note1) This parameter is required when “epsg” parameter is specified.
Note2) Request fails if a “meshcode” parameter is specified.

5 epsg Conditional EPSG code

  • JGD2000…4612
  • Tokyo…4301
  • WGS84…4326

Note1) This parameter is required when “position” parameter is specified.
Note2) Request fails if a “meshcode” parameter is specified.

6 attr Optional Seismic hazard attribute

Refer to a List of seismic hazard attributes for more information. If not specified, all attributes are returned.

The following is a list of version codes.

Version code Description
V1 Based on seismic activity model for 2012 version of PSHM but all earthquakes are evaluated as Poisson process.
V2 Based on seismic activity model for 2013 version (model 2) of PSHM but all earthquakes are evaluated as Poisson process.
V3 Based on seismic activity model for 2013 version (model 1) of PSHM but all earthquakes are evaluated as Poisson process.
V4 Based on seismic activity model for 2014 version of PSHM but all earthquakes are evaluated as Poisson process.
V5 Based on seismic activity model for 2016 version of PSHM but all earthquakes are evaluated as Poisson process.
V6 Based on seismic activity model for 2017 version of PSHM but all earthquakes are evaluated as Poisson process.
V7 Based on seismic activity model for 2018 version of PSHM but all earthquakes are evaluated as Poisson process.
V8 Based on seismic activity model for 2020 version of PSHM but all earthquakes are evaluated as Poisson process.

The following is a list of seismic hazard attributes.

Attribute name Format Description
A0500_SI %s IJMA with a Return Period of 500-year
A1000_SI %s IJMA with a Return Period of 1000-year
A5000_SI %s IJMA with a Return Period of 5000-year
A010K_SI %s IJMA with a Return Period of 10,000-year
A050K_SI %s IJMA with a Return Period of 50,000-year
A100K_SI %s IJMA with a Return Period of 100,000-year

Response

Status code

The data acquisition is successful, once you got the return HTTP 200 status code. Otherwise, please see the following HTTP status code.

HTTP status code Description Detail
400 Bad Request The request could not be understood by the server due to malformed syntax.

For example, unsupported value was setup.

403 Forbidden The server understood the request, but is refusing to fulfill it.

For example, requests exceeded the upper limits of normal.

404 Not Found The server has not found anything matching the Request-URI.

For example, non-existent mesh code was specified.

500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request.
503 Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.

For example, a database connection fails.

Normal case
GeoJSON format

GeoJSON response is as follows.

Tag Description
type The type of the GeoJSON object

  • FeatureCollection (fixed)
crs The coordinate reference system (CRS) of the GeoJSON object
status Request status

  • Success (fixed)
features Member element
An array with a geometry of the rectangular mesh and its attribute
type The type of the GeoJSON object

  • Feature (fixed)
geometry A geometry object of the rectangular mesh
properties Any JSON object or a JSON null object
meshcode 250m mesh code
Refer to the Quarter Grid Square definition for details.
Seismic hazard attribute name
(such as A0500_SI)
Seismic hazard attributes

Refer to a List of seismic hazard attribute for details.

metaData Meta-information
meshcode 250m mesh code
Refer to the Quarter Grid Square definition for details.
version Version code
attr Array of seismic hazard attribute name
name Seismic hazard attributes

Refer to a List of seismic hazard attribute for details.

unit Unit of the attribute value
Response sample
Request URL
https://www.j-shis.bosai.go.jp/map/api/avghzd/V1/meshinfo.geojson?meshcode=5440008644N&attr=A0500_SI
GeoJSON format response
{
  "type": "FeatureCollection",
  "crs": {
    "type": "name",
    "properties": {
      "name": "urn:ogc:def:crs:EPSG:4301"
    }
  },
  "status": "Success",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "coordinates": [
          [
            [
              140.08437,
              36.07292
            ],
            [
              140.08437,
              36.075
            ],
            [
              140.0875,
              36.075
            ],
            [
              140.0875,
              36.07292
            ],
            [
              140.08437,
              36.07292
            ]
          ]
        ],
        "type": "Polygon"
      },
      "properties": {
        "meshcode": "5440008644N"
        "A0500_SI": "6L",
      }
    }
  ],
  "metaData": {
    "meshcode": "5440008644N",
    "version": "V1",
    "attr": [
      {
        "name": "A0500_SI",
        "unit": ""
      }
    ]
  }
}
GML format

GML response is given as following.

Tag Description
gml:
boundedBy
A bounding box of all geometries included in the response
gml:
featureMember
Member element
jshis:
mesh
Mesh
gml:
coverage
A geometry object of the rectangular mesh
jshis:
meshcode
250m mesh code
Refer to the Quarter Grid Square definition for details.
Seismic hazard attribute name
(such as A0500_SI)
Seismic hazard attribute

Refer to a List of Seismic hazard attribute for details.

jshis:
status
Request status

  • Success (fixed)
jshis:
metaData
Meta-information
jshis:
version
Map version
jshis:
meshcode
250m mesh code
Refer to the Quarter Grid Square definition for details.
jshis:
attrs
Seismic hazard attribute name array
jshis:
attr
Seismic hazard attribute included in the response
jshis:
name
Seismic hazard attribute

Refer to a List of Seismic hazard attribute for details.

jshis:
unit
Unit of the attribute value
Response sample
Request URL
https://www.j-shis.bosai.go.jp/map/api/avghzd/V1/meshinfo.gml?meshcode=5440008644N&attr=A0500_SI
GML format response
<?xml version="1.0" encoding="utf-8"?>
<jshis:AvghzdMeshinfo xmlns:gml="http://www.opengis.net/gml"
 xmlns:jshis="http://www.j-shis.bosai.go.jp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.j-shis.bosai.go.jp http://www.j-shis.bosai.go.jp/map/xsd/gml-v2.1.2/avghzd-meshinfo-v1.0.xsd">
  <gml:boundedBy>
    <gml:Box srsName="urn:ogc:def:crs:EPSG:4301">
      <gml:coord>
        <gml:X>140.08437</gml:X>
        <gml:Y>36.07292</gml:Y>
      </gml:coord>
      <gml:coord>
        <gml:X>140.0875</gml:X>
        <gml:Y>36.075</gml:Y>
      </gml:coord>
    </gml:Box>
  </gml:boundedBy>
  <gml:featureMember>
    <jshis:mesh>
      <gml:coverage>
        <gml:Polygon srsName="urn:ogc:def:crs:EPSG:4301">
          <gml:outerBoundaryIs>
            <gml:LinearRing>
              <gml:coordinates>140.08437,36.07292
                       140.08437,36.075
                       140.0875,36.075
                       140.0875,36.07292
                       140.08437,36.07292 </gml:coordinates>
            </gml:LinearRing>
          </gml:outerBoundaryIs>
        </gml:Polygon>
      </gml:coverage>
      <jshis:meshcode>5440008644N</jshis:meshcode>
      <jshis:A0500_SI>6L</jshis:A0500_SI>
    </jshis:mesh>
  </gml:featureMember>
  <jshis:status>Success</jshis:status>
  <jshis:metaData>
    <jshis:version>V1</jshis:version>
    <jshis:meshcode>5440008644N</jshis:meshcode>
    <jshis:attrs>
      <jshis:attr>
        <jshis:name>A0500_SI</jshis:name>
        <jshis:unit/>
      </jshis:attr>
    </jshis:attrs>
  </jshis:metaData>
</jshis:AvghzdMeshinfo>
Error case
Error classification code

Error classification code is given as following.

Classification code Description
INVALID_REQUEST The request could not be understood by the server due to malformed syntax.
DB_CONNECT_ERROR An error about Database occurred while processing your request.
UNKNOWN_ERROR An unknown error occurred while processing your request.
NOT_FOUND The server has not found anything matching the Request-URI.
GeoJSON format

Once a request failed, response in GeoJSON format is given as following.

Tag Description
type The type of the GeoJSON object

  • FeatureCollection (fixed)
status Request status

  • Error (fixed)
error Error information
code The error classification code
message An error message
features An empty array
Response sample
Request URL
https://www.j-shis.bosai.go.jp/map/api/avghzd/V0/meshinfo.geojson?meshcode=5440008644N&attr=A0500_SI
GeoJSON format error response
{
  "type": "FeatureCollection",
  "status": "Error",
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Supported value for option [ version ] is V1,V2,V3,V4,V5,V6,V7"
  },
  "features": [
    {
      "geometry": {
        "coordinates": [
          []
        ]
      }
    }
  ]
}
GML format

In a request failed, response in GML format is as follows.

Tag Description
gml:boundedBy null element

<gml:null>unknown</gml:null>

(fixed)

gml:featureMember An empty array
jshis:status Request status

  • Error (fixed)
jshis:error Error information
jshis:code An error classification code
jshis:message An error message
Response sample
Request URL
https://www.j-shis.bosai.go.jp/map/api/avghzd/V0/meshinfo.gml?meshcode=5440008644N&attr=A0500_SI
Error response in GML format
<?xml version="1.0" encoding="utf-8"?>
<jshis:AvghzdMeshinfo xmlns:gml="http://www.opengis.net/gml"
 xmlns:jshis="http://www.j-shis.bosai.go.jp"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.j-shis.bosai.go.jp http://www.j-shis.bosai.go.jp/map/xsd/gml-v2.1.2/avghzd-meshinfo-v1.0.xsd">
    <gml:boundedBy>
        <gml:null>unknown</gml:null>
    </gml:boundedBy>
    <gml:featureMember/>
    <jshis:status>Error</jshis:status>
    <jshis:error>
        <jshis:code>INVALID_REQUEST</jshis:code>
        <jshis:message>Supported value for option [ version ] is V1,V2,V3,V4,V5,V6,V7,V8</jshis:message>
    </jshis:error>
</jshis:AvghzdMeshinfo>
Category : API