Location tools
MCP.Scientio.Com documentation

Location

These tools turn a place name into coordinates, using the GeoNames gazetteer of the world's populated places, administrative areas and physical features. Many places share a name, so a lookup returns every match together with the details that tell them apart — the country it is in and what kind of place it is.

The coordinates come back as a fuzzy location, the same form the knowledge graph location tools use, so a match can be given straight to UpdateNodeLocations to say where the thing a node represents is.

FindLocation

read-only Try it

Finds a list of possible locations given a place name.

Parameters

NameTypeDescription
locationNamestringThe name of the location. The whole name must match, but any capitalization will do.

Returns

A list of extended locations, most populous first, or an empty list if nothing matches. Each one holds:

FieldDescription
locationThe fuzzy location of the place: a single longitude, latitude and altitude. The altitude is 0.0 where the gazetteer records no elevation.
CountryCodeThe ISO country code of the country the place is in, for example GB.
TypeThe kind of place its GeoNames feature code stands for, for example capital of a political entity for the code PPLC.
CountryNameThe name of the country the code stands for, for example United Kingdom. Empty where the code is not one of ISO 3166-1.
TopLevelRegionNameThe first-order administrative division the country code and the GeoNames admin1 code name together, for example England for GB.ENG. Empty where the pair is not one GeoNames knows.
SecondaryRegionNameThe second-order administrative division the country code and the GeoNames admin1 and admin2 codes name together, for example Greater London for GB.ENG.GLA. Empty where the three are not ones GeoNames knows.

Notes

At most 100 places are returned, so that a very common name cannot swamp the caller. Names are matched in full: search for London rather than Lond.