Averaged hazard information API
Version
Request URL
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
By Longitude and Latitude
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
Refer to a list of version codes for details. |
2 | format | Required | Response format
|
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.
Note1) This parameter is required when “epsg” parameter is specified. |
5 | epsg | Conditional | EPSG code
Note1) This parameter is required when “position” 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
|
||
crs | The coordinate reference system (CRS) of the GeoJSON object | ||
status | Request status
|
||
features | Member element An array with a geometry of the rectangular mesh and its attribute |
||
type | The type of the GeoJSON object
|
||
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 |
{ "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
|
|||
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 |
<?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
|
|
status | Request status
|
|
error | Error information | |
code | The error classification code | |
message | An error message | |
features | An empty array |
{ "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
|
|
jshis:error | Error information | |
jshis:code | An error classification code | |
jshis:message | An error message |
<?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>