geocoding


URI

<address_uri>/geocoding[.<format>]

Supported methods

GET, HEAD

Parent resource

address

Introduction

geocoding resource indicates forward matching function in address matching. Queries the position of the address according to the keyword of address name thrught sending Get request to geocoding.

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/geocoding.rjson

GET request

Gets the result of matching address.

Request parameter

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

Name Type Description
address String 【Required】
The keyword of address
fromIndex int Sets the original index value of returned object, the object of the start index value is included in the result.
toIndex int Sets the end index value of returned object, the object of the end index value isnot included in the result.
filters String[] Sets the filter parameter. The parameter is used to limit the querying range. In the service configuration file, you can specify the incoming level of administrative division through districtFields parameter. Administrative level not more than three. All eligible locations are returned if without setting the parameter.
prjCoordSys PrjCoordSys The coordinate system of querying result

Response structure

Sending GET request to geocoding 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[] The filter parameter. The area where the position is located
location Point2D The position coordinate of querying position
score double Matching degree

Response example

Sending GET request to geocoding resource: hhttp://supermapiserver:8090/iserver/services/addressmatch-Address/restjsr/v1/address/geocoding.rjson?address=Company&districts=%5BShijingshan,Beijing%5D&fromIndex=0&toIndex=10&maxReturn=5ttp://supermapiserver:8090/iserver/services/addressmatch-Address/restjsr/v1/address/geocoding.rjson?address=公司&districts=%5B北京市,石景山区%5D&fromIndex=0&toIndex=10&maxReturn=5 to query addresses of all companies in Shijingshan, Beijing, the description of the returned rjson format are:

[

  {

    "address": "Beijing Shijingshan District eight high-tech park on the 1st Street Xingxing East 4485 Beijing WeiZhi advertising company",

    "filters": [

      "Beijing",

      "Shijingshan"

    ],

    "location": {

      "x": 1.2969263932972612E7,

      "y": 4856953.536161510

    },

    "score": 31.25

  },

  {

    "address": "Beijing Shijingshan District eight high-tech park Xijing Road 3, Building 3, Room 1275 Beijing is the industry advertising company",

    "filters": [

      "Beijing",

      "Shijingshan"

    ],

    "location": {

      "x": 1.2969263932972612E7,

      "y": 4856476.012902220

    },

    "score": 31.25

  },

  {

    "address": "ShiJingshan District of Beijing Badachu Hi-Tech Park Beijing Sai-Li Technology Development Corporation",

    "filters": [

      "Beijing",

      "Shijingshan"

    ],

    "location": {

      "x": 1.2969263932972612E7,

      "y": 4858662.89110245

    },

    "score": 30

  },

  {

    "address": "Beijing Shijingshan District eight high-tech park Shixing Building Room 4369 Beijing Weibo Technology Development Corporation",

    "filters": [

      "Beijing",

      "Shijingshan"

    ],

    "location": {

      "x": 1.2969263932972612E7,

      "y": 4856405.512965070

    },

    "score": 30

  },

  {

    "address": "Beijing Shijingshan District eight high-tech park in the real estate Building Room 4191 Beijing Hua Di Technology Development Company",

    "filters": [

      "Beijing",

      "Shijingshan"

    ],

    "location": {

      "x": 1.2969263932972612E7,

      "y": 4856396.629646530

    },

    "score": 29.545454545454500

  }

]

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 geocoding resource exists, or if the geocoding resource can be accessed by clients. It can also determine if the geocoding resource supports an output format <format> if performed on a URI with .<format> included.

See