geodecoding


URI

<address_uri>/geodecoding[.<format>]

Supported methods

GET, HEAD

Parent resource

address

Introduction

geodecoding resource indicates the reverse matching function in address matching. Sending Get request to geodecoding resource, querying the location according to the position coordinate. You can set the querying range in service configuration file

Supported Methods:

Supported output formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.

http://supermapiserver:8090/iserver/services/address-school/restjsr/address/geodecoding.rjson

GET request

Gets the result of matching address.

Request parameter

Sending Get request to geodecoding. The following parameter needs to be included:

Name Type Description
x double 【Required
The abscissa of the query location
y double 【Required
The ordinate of the query location
fromIndex int Sets the original index value of returned object
toIndex int Sets the end index value of returned object
filters String[] Limits the filter fields. In the service configuration file, you can specify the incoming level of administrative division through filterFields parameter. Administrative level not more than three. All eligible locations are returned if without setting the parameter.
prjCoordSys PrjCoordSys Input the coordinate system of parameters x, y

Response structure

Sending GET request to geodecoding resource, there is a result description set in the entity of response messaging, where the structure of a single resource description is as follows:

Field Type Description
address String The name of location to be queried. The location name is made up of multiple fields, each of which represents an administrative level or street address. In the service configuration file, you can set the field order through searchFields parameter.
filters String[] In the service configuration file, you can specify the returned level of administrative division through filterFields parameter.
location Point2D The position coordinate of querying position
score double Matching degree In the matching result, the value is 0.

Response example

Takes addressmatch-Address/restjsr as an example, querying the address within 100 meters of the specified point in the dataset company, sending GET request to geodecoding resource: http://supermapiserver:8090/iserver/services/addressmatch-Address/restjsr/v1/address/geodecoding.rjson?x=12969215.3912997&y=4863405.56901&fromIndex=0&toIndex=10&maxReturn=5&geoDecodingRadius=100, the decription of returned resource with rjson format is as follows. The representation returned in rjson is as follows:

[

  {

    "address": "Chaoyang District, Beijing Jiuxianqiao North Road on the 10th floor, Building 201, 403-A Beijing Pacific Wright Technology Co., Ltd.",

    "filters": [

      "Beijing",

      "Chaoyang District"

    ],

    "location": {

      "x": 1.2969263932972612E7,

      "y": 4863408.733374170

    },

    "score": 0

  },

  {

    "address": "Beijing Chaoyang District Jiuxianqiao North Road on the 10th Electronic City IT Industrial Park, 201th Floor, E door 3 layer Beijing SuperMap software Co., Ltd."

    "filters": [

      "Beijing",

      "Chaoyang District"

    ],

    "location": {

      "x": 1.2969263932972612E7,

      "y": 4863405.569010000

    },

    "score": 0

  },

  {

    "address": "Chaoyang District, Beijing Jiuxianqiao North Road on the 10th hospital 201 Building, 4th Floor, 403 Beijing ShiYouGuangLianGuang Electronic Equipment Co., Ltd.",

    "filters": [

      "Beijing",

      "Chaoyang District"

    ],

    "location": {

      "x": 1.2969263932972612E7,

      "y": 4863406.599127060

    },

    "score": 0

  },

  {

    "address": "Chaoyang District, Beijing Jiuxianqiao North Road on the 10th hospital 402 floor, the second floor of the DeXinHuDong Technology (Beijing) Co., Ltd."

    "filters": [

      "Beijing",

      "Chaoyang District"

    ],

    "location": {

      "x": 1.2969263932972612E7,

      "y": 4863408.379044920

    },

    "score": 0

  }

]

HEAD request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

HEAD request can be used to check if the geodecoding resource exists, or if the geodecoding resource can be accessed by clients. It can also determine if the geodecoding resource supports an output format <format> if performed on a URI with .<format> included.

See