from city

This block is part of the geopoint group and was last modified in core v15.0.0.

from city v15.0.0

Resolves a city/town name (optionally constrained to a country code, e.g. NL, and a province/state, e.g. Vermont) to a geo point at the city centre, plus the city's radius in metres and its province/country. Offline lookup against the embedded dataset. A city name is not unique within a country : eight US states have a Morristown : so wire province whenever you know it, for example straight from geo point reverse geocode.

In pins 3
  • city required
    value

    city/town name to look up, e.g. Brummen

  • country code
    value

    optional ISO country code to disambiguate, e.g. NL. Leave empty to search all covered countries.

  • province v15.0.0
    value

    optional province/state to disambiguate, e.g. Vermont. Leave empty to search the whole country. When set it must match a place in that province, otherwise the lookup fails with NOT_FOUND rather than returning a same-named city elsewhere.

Out pins 7
  • geo point
    geo_point

    point at the city centre

  • radius
    number

    approximate radius of the city in kilometres (population-derived)

  • province
    value
  • country
    value
  • country code
    value
  • success
    condition
  • error
    value

    MISSING_CITY, NOT_FOUND or GEOCODER_NOT_AVAILABLE when success is false.

geocode
city to coordinates
city center
forward geocode

A typical wiring for from city: reverse geocode feeds the city pin; the geo_point out pin feeds if; the radius out pin feeds if.

Studio canvas example for the from city block: typical wiring for from city.

Commonly used with

In production blueprints, this block is most often wired together with:

  • if: this block feeds into it.
  • reverse geocode: feeds into this block. Resolves a geo point to the nearest street, city, province and country. City/province/country are nearest-populated-place, and always stay in the country of the nearest known place — a point near a border is never relabelled with a larger city on the other side. Street is the nearest named road (needs the road network loaded).
  • if: this block feeds into it.

Used in these guides

These documentation pages use or explain this block:

Version history

Introduced in v15.0.0.


Back to geopoint Return to the main group to view all sub-groups Back to Geopoint Return to the group to view all blocks within this group