J-SHIS | Japan Seismic Hazard Information Station

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

Mesh Search API

This API provides meshes with shallow subsurface information, which are satisfied the filtering condition by a user.

Version

1.0.0

Request URL

http://www.j-shis.bosai.go.jp/map/api/meshsearch?meshcode=meshcode&format=format&filter=filter&radius=radius&options
http://www.j-shis.bosai.go.jp/map/api/meshcode/meshsearch?format=format&filter=filter&radius=radius&options
http://www.j-shis.bosai.go.jp/map/api/meshsearch?center=center&epsg=epsg&format=format&filter=filter&radius=radius&options

Table of contents

Request

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

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
http://www.j-shis.bosai.go.jp/map/api/meshsearch?meshcode=meshcode1&format=format4&filter=filter5&radius=radius6&options7
http://www.j-shis.bosai.go.jp/map/api/meshcode1/meshsearch?format=format4&filter=filter5&radius=radius6&options7
By Longitude and Latitude
http://www.j-shis.bosai.go.jp/map/api/meshsearch?center=center2&epsg=epsg3&format=format4&filter=filter5&radius=radius6&options7
Parameters

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

No Parameter Dispensability Input values and Description
1 meshcode Conditional 250m mesh code

Refer to the Quarter Grid Square definition for more information.

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

2 center Conditional Longitude and latitude, which specify a center coordinate of a search area, are separated by a comma.The coordinates are restricted in the following regions.

  • 122.0≦Longitude≦154.0
  • 20.0≦Latitude≦47.0

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

3 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.

4 format Required Response format

  • GeoJSON format…geojson
  • GML format…gml
5 filter Required Conditional equation
Format:[attribute]_[operator]_[value]

For example; JCODE_lt_15
⇒One can search meshes that JCODE is smaller than 15.

6 radius Required Search radius in [km]
The radius is restricted to a following range.

  • ~10km
7 version Optional Version code of the shallow subsurface structure

  • Version 1…V1
  • Version 2…V2
  • Version 3…V3

Refer to a list of version codes for details.
Default value…The latest version

7 offset Optional Offset of search results
Default value…0
7 limit Optional Number of results
If not specified, all search results are returned.
7 order Optional Sort condition
In the case of multiple-conditions, they are separated by a comma.
Format:[Attribute]+[Sort direction],[Attribute]+[Sort direction],…

  • Attribute…Shallow subsurface structural attribute code or distance (“DIST”)
  • Sort direction
    • Ascending …ASC
    • Descending…DESC

Note1) If an attribute is not specified, search results are sorted by the attribute specified in a filter first, and then sorted by mesh code. The attribute specified in filter has priority.
Note2) Default sort direction…ASC
Note3) Sort direction by mesh code…ASC only
For example;JCODE+DESC,AVS
Search results are sorted in the following order.
⇒JCODE is descending order, AVS mesh code are in ascending order.

7 lang Optional Response language

  • Japanese…ja
  • English…en

Note) A default value is “ja”.

A list of version codes of the shallow subsurface structure information

Version code Description
V1 The 250m mesh data converted by dividing a third-mesh (about 1km square) into 16 meshes used for from 2005 version to 2008 version of “Probabilistic Seismic Hazard Maps”.
V2 The 250m mesh data used for 2009 version of “National Seismic Hazard Maps for Japan”.
V3 The 250m mesh data used for 2014 version of “National Seismic Hazard Maps for Japan”.

The following is a list of shallow subsurface structural attribute codes.

Factor name Format Description
JCODE %2d Classification code for engineering geomorphologic
Note that the code varies depending on the version code.

Refer to Guide for file “Site amplification factors” for details.

JNAME %s Classification name for engineering geomorphologic

Refer to Guide for file “Site amplification factors” for details.

AVS %5.1f Average S-wave velocity in the upper 30m of the ground
ARV %9.4f Site amplification factor (Vs=400m/s – surface)

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 more information.

JCODE Classification code for engineering geomorphologic

Refer to a list of shallow subsurface attribute codes for details.

JNAME Classification name for engineering geomorphologic

Refer to a list of shallow subsurface attribute codes for details.

AVS Average S-wave velocity in the upper 30m of the ground

Refer to a list of shallow subsurface attribute codes for details.

ARV Site amplification factor (Vs=400m/s – surface)

Refer to a list of shallow subsurface attribute codes for details.

metaData Meta-information
meshcode 250m mesh code

Refer to the Quarter Grid Square definition for more information.

filter Search condition
version Version code
center Longitude and latitude at a center of a search area
radius Search radius
unit Unit of a search radius
value Search radius value
order Sort condition
attr Sort attribute
direction Sort direction

  • Ascending…ASC
  • Descending…DESC
attr shallow subsurface attribute
name shallow subsurface attribute code

Refer to a list of shallow subsurface attribute codes for details.

unit Unit of the attribute value
offset Offset of search results
total Total number of search results
Response sample
Request URL
http://www.j-shis.bosai.go.jp/map/api/5339358942N/meshsearch?format=geojson&filter=JCODE_lt_15&radius=10&limit=5&order=DIST&lang=en
GeoJSON format response
{
   "type":"FeatureCollection",
   "crs":{
      "type":"name",
      "properties":{
         "name":"urn:ogc:def:crs:EPSG:4301"
      }
   },
   "status":"Success",
   "features":[
      {
         "geometry":{
            "coordinates":[
               [
                  [
                     139.74687,
                     35.65417
                  ],
                  [
                     139.74687,
                     35.65625
                  ],
                  [
                     139.75,
                     35.65625
                  ],
                  [
                     139.75,
                     35.65417
                  ],
                  [
                     139.74687,
                     35.65417
                  ]
               ]
            ],
            "type":"Polygon"
         },
         "type":"Feature",
         "properties":{
            "JNAME":"Terrace covered with volcanic ashsoil",
            "AVS":"246.9",
            "meshcode":"5339358942N",
            "JCODE":"9",
            "ARV":"1.5083"
         }
      },
      {
         "geometry":{
            "coordinates":[
               [
                  [
                     139.74687,
                     35.65208
                  ],
                  [
                     139.74687,
                     35.65417
                  ],
                  [
                     139.75,
                     35.65417
                  ],
                  [
                     139.75,
                     35.65208
                  ],
                  [
                     139.74687,
                     35.65208
                  ]
               ]
            ],
            "type":"Polygon"
         },
         "type":"Feature",
         "properties":{
            "JNAME":"Valley bottom lowland",
            "AVS":"187.7",
            "meshcode":"5339358924N",
            "JCODE":"10",
            "ARV":"1.9057"
         }
      },
      {
         "geometry":{
            "coordinates":[
               [
                  [
                     139.74687,
                     35.65625
                  ],
                  [
                     139.74687,
                     35.65833
                  ],
                  [
                     139.75,
                     35.65833
                  ],
                  [
                     139.75,
                     35.65625
                  ],
                  [
                     139.74687,
                     35.65625
                  ]
               ]
            ],
            "type":"Polygon"
         },
         "type":"Feature",
         "properties":{
            "JNAME":"Terrace covered with volcanic ashsoil",
            "AVS":"246.9",
            "meshcode":"5339358944N",
            "JCODE":"9",
            "ARV":"1.5083"
         }
      },
      {
         "geometry":{
            "coordinates":[
               [
                  [
                     139.74375,
                     35.65417
                  ],
                  [
                     139.74375,
                     35.65625
                  ],
                  [
                     139.74687,
                     35.65625
                  ],
                  [
                     139.74687,
                     35.65417
                  ],
                  [
                     139.74375,
                     35.65417
                  ]
               ]
            ],
            "type":"Polygon"
         },
         "type":"Feature",
         "properties":{
            "JNAME":"Terrace covered with volcanic ashsoil",
            "AVS":"246.9",
            "meshcode":"5339358941N",
            "JCODE":"9",
            "ARV":"1.5083"
         }
      },
      {
         "geometry":{
            "coordinates":[
               [
                  [
                     139.75,
                     35.65417
                  ],
                  [
                     139.75,
                     35.65625
                  ],
                  [
                     139.75313,
                     35.65625
                  ],
                  [
                     139.75313,
                     35.65417
                  ],
                  [
                     139.75,
                     35.65417
                  ]
               ]
            ],
            "type":"Polygon"
         },
         "type":"Feature",
         "properties":{
            "JNAME":"Terrace covered with volcanic ashsoil",
            "AVS":"194.7",
            "meshcode":"5339368031N",
            "JCODE":"9",
            "ARV":"1.8468"
         }
      }
   ],
   "metaData":{
      "radius":{
         "unit":"km",
         "value":"10"
      },
      "version":"V2",
      "filter":"JCODE_lt_15",
      "attr":[
         {
            "unit":"",
            "name":"ARV"
         },
         {
            "unit":"m/s",
            "name":"AVS"
         },
         {
            "unit":"",
            "name":"JCODE"
         },
         {
            "unit":"",
            "name":"JNAME"
         }
      ],
      "total":"5",
      "center":"139.7484375,35.65520833",
      "order":[
         {
            "direction":"ASC",
            "attr":"DIST"
         }
      ],
      "meshcode":[
         "5339358942N",
         "5339358924N",
         "5339358944N",
         "5339358941N",
         "5339368031N"
      ],
      "offset":"0"
   }
}
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.

jshis:
JCODE
Classification code for engineering geomorphologic

Refer to a list of shallow subsurface attribute codes for details.

jshis:
JNAME
Classification name for engineering geomorphologic

Refer to a list of shallow subsurface attribute codes for details.

jshis:
AVS
Average S-wave velocity in the upper 30m of the ground

Refer to a list of shallow subsurface attribute codes for details.

jshis:
ARV
Site amplification factor (Vs=400m/s – surface)

Refer to a list of shallow subsurface attribute codes for details.

jshis:
status
Request status

  • Success (fixed)
jshis:
metaData
Meta-information
jshis:
meshcodes
Mesh code array
jshis:
meshcode
250m mesh code

Refer to the Quarter Grid Square definition for more information.

jshis:
filter
Search condition
jshis:
version
Version code
jshis:
center
Longitude and latitude at a center of a search area
jshis:
radius
Search radius information
jshis:
value
Search radius
jshis:
unit
Unit of a search radius
jshis:
orders
Sort condition array
jshis:
order
Sort condition
jshis:
attr
Sort attribute
jshis:
direction
Sort direction

  • Ascending…ASC
  • Descending…DESC
jshis:
offset
Offset of search results
jshis:
total
Total number of search results
jshis:
attrs
shallow subsurface attribute array
jshis:
attr
shallow subsurface attribute
jshis:
name
shallow subsurface attribute code

Refer to a list of shallow subsurface attribute codes for details.

jshis:
unit
Unit of the attribute value
Response sample
Request URL
http://www.j-shis.bosai.go.jp/map/api/meshsearch?format=gml&meshcode=5339358942N&filter=JCODE_ge_16&radius=10&limit=2&order=JCODE,DIST&lang=en
GML format response
<?xml version="1.0" encoding="utf-8"?>
<jshis:MeshSearch 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/meshsearch-v1.0.xsd">
    <gml:boundedBy>
        <gml:Box srsName="urn:ogc:def:crs:EPSG:4301">
            <gml:coord>
                <gml:X>139.74687</gml:X>
                <gml:Y>35.64792</gml:Y>
            </gml:coord>
            <gml:coord>
                <gml:X>139.75313</gml:X>
                <gml:Y>35.65208</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>139.75,35.65 139.75,35.65208 139.75313,35.65208 139.75313,35.65 139.75,35.65 </gml:coordinates>
                        </gml:LinearRing>
                    </gml:outerBoundaryIs>
                </gml:Polygon>
            </gml:coverage>
            <jshis:meshcode>5339368011N</jshis:meshcode>
            <jshis:JNAME>Marine sand and gravel bars</jshis:JNAME>
            <jshis:JCODE>16</jshis:JCODE>
            <jshis:AVS>260.2</jshis:AVS>
            <jshis:ARV>1.4425</jshis:ARV>
        </jshis:mesh>
    </gml:featureMember>
    <gml:featureMember>
        <jshis:mesh>
            <gml:coverage>
                <gml:Polygon srsName="urn:ogc:def:crs:EPSG:4301">
                    <gml:outerBoundaryIs>
                        <gml:LinearRing>
                            <gml:coordinates>139.74687,35.64792 139.74687,35.65 139.75,35.65 139.75,35.64792 139.74687,35.64792 </gml:coordinates>
                        </gml:LinearRing>
                    </gml:outerBoundaryIs>
                </gml:Polygon>
            </gml:coverage>
            <jshis:meshcode>5339357944N</jshis:meshcode>
            <jshis:JNAME>Marine sand and gravel bars</jshis:JNAME>
            <jshis:JCODE>16</jshis:JCODE>
            <jshis:AVS>260.2</jshis:AVS>
            <jshis:ARV>1.4425</jshis:ARV>
        </jshis:mesh>
    </gml:featureMember>
    <jshis:status>Success</jshis:status>
    <jshis:metaData>
        <jshis:attrs>
            <jshis:attr>
                <jshis:name>ARV</jshis:name>
                <jshis:unit/>
            </jshis:attr>
            <jshis:attr>
                <jshis:name>AVS</jshis:name>
                <jshis:unit>m/s</jshis:unit>
            </jshis:attr>
            <jshis:attr>
                <jshis:name>JCODE</jshis:name>
                <jshis:unit/>
            </jshis:attr>
            <jshis:attr>
                <jshis:name>JNAME</jshis:name>
                <jshis:unit/>
            </jshis:attr>
        </jshis:attrs>
        <jshis:center>139.7484375,35.65520833</jshis:center>
        <jshis:filter>JCODE_ge_16</jshis:filter>
        <jshis:meshcodes>
            <jshis:meshcode>5339368011N</jshis:meshcode>
            <jshis:meshcode>5339357944N</jshis:meshcode>
        </jshis:meshcodes>
        <jshis:offset>0</jshis:offset>
        <jshis:orders>
            <jshis:order>
                <jshis:attr>JCODE</jshis:attr>
                <jshis:direction>ASC</jshis:direction>
            </jshis:order>
            <jshis:order>
                <jshis:attr>DIST</jshis:attr>
                <jshis:direction>ASC</jshis:direction>
            </jshis:order>
        </jshis:orders>
        <jshis:radius>
            <jshis:unit>km</jshis:unit>
            <jshis:value>10</jshis:value>
        </jshis:radius>
        <jshis:total>2</jshis:total>
        <jshis:version>V2</jshis:version>
    </jshis:metaData>
</jshis:MeshSearch>
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
http://www.j-shis.bosai.go.jp/map/api/5339358942N/meshsearch?format=geojson&filter=JCODE_lt_15&radius=20&limit=5&order=DIST
GeoJSON format error response
{
   "type":"FeatureCollection",
   "status":"Error",
   "features":[
      {
         "geometry":{
            "coordinates":[
               [

               ]
            ]
         }
      }
   ],
   "error":{
      "message":"Set 0 < radius <= 10 for option [radius]",
      "code":"INVALID_REQUEST"
   }
}
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
http://www.j-shis.bosai.go.jp/map/api/meshsearch?format=gml&meshcode=5339358942N&filter=JCODE_aa_16&radius=10&limit=2&order=JCODE,DIST
GML format error response
<?xml version="1.0" encoding="utf-8"?>
<jshis:MeshSearch 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/meshsearch-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 options for [filter.operator] are : eq / ge / gt / le / lt / ne </jshis:message>
    </jshis:error>
</jshis:MeshSearch>
Category : API