Locate Rest Service

Introduction

The search datasets configured in Spectrum Spatial can also be accessed using the Locator REST API service which is exposed as part of the Spectrum Spatialâ„¢ Analyst client application.
Note: Each data set is referred to as a gazetteer in the API. The API has three operations which are described below.

List of available search data set gazetteers

Overview

Lists all the valid gazetteers.

Returns: {ArrayList} a list of all the valid gazetteer names

Sample Request

http://localhost:8010/connect/LocateService/services/rest/analyst/gazetteers.json

Sample Response

{"Gazetteers":["Address1","Address2"]}

Describe a search data set gazetteer

Gives detailed information about the gazetteer of a particular tenant.

Parameters:

{String} gazetteer the gazetteer name from the list response.

Returns: {JSON} a json giving detailed information about the gazetteer for the given tenant

Sample Request

http://localhost:8010/connect/LocateService/services/rest/analyst/gazetteers/Address1/describe.json

Sample Response

{"GazetteerDescription":{"Version":"1.0","Name":"Address1","crs":{"type":"name","properties":{"name":"epsg:27700"}}}}

Search a search data set gazetteer

Overview

List search results for a query string entered for a particular gazetteer. The SRS and Count fields are optional.

Parameters:

{String} gazetteer the gazetteer name from the list response.

{String} {Optional} srs the spatial reference system (srs) in EPSG form.

{String} {Optional} count the maximum number of search results to be returned.

{String} query the partial address string to return matching addresses for

Returns: {JSON} a json giving multiple search results for the given query string

Sample Request

http://localhost:8010/connect/LocateService/services/rest/analyst/gazetteers/Address1/search.json?&q=Camden Road&srs=EPSG:27700&count=10

Sample Response

{"SearchResults":[{"id":"39792","name":"Cantelowes Gardens, Camden Road","score":0,"srs":"epsg:27700","x":529535,"y":184752},{"id":"27657","name":"201A, Camden Road, NW1 9AA","score":0,"srs":"epsg:27700","x":529701,"y":184919},{"id":"93472","name":"201B, Camden Road, NW1 9AA","score":0,"srs":"epsg:27700","x":529701,"y":184919},{"id":"84406","name":"Camden Road Station, Camden Road, London, NW1 9LS","score":0,"srs":"epsg:27700","x":529144,"y":184205},{"id":"47074","name":"Camden Park Studios, Camden Park Road, London, NW1 9AY","score":0,"srs":"epsg:27700","x":529833,"y":184759},{"id":"136","name":"68, Camden Road, London, NW1 9DT","score":0,"srs":"epsg:27700","x":529120,"y":184040},{"id":"229","name":"48, Camden Road, London, NW1 9DR","score":0,"srs":"epsg:27700","x":529056,"y":183991},{"id":"358","name":"278, Camden Road, London, NW1 9AB","score":0,"srs":"epsg:27700","x":529808,"y":184934},{"id":"712","name":"154, Camden Road, London, NW1 9HJ","score":0,"srs":"epsg:27700","x":529408,"y":184430},{"id":"827","name":"266, Camden Road, London, NW1 9AB","score":0,"srs":"epsg:27700","x":529776,"y":184894}]}