nearest places

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

nearest places v15.0.0

Finds the nearest points of interest to a geo point, ordered by distance, with the distance to each in metres. Leave max distance empty for an unbounded search : because you get distances back rather than a yes/no, you can apply any radius afterwards without querying again, which is what makes a free-choice radius slider possible. Data is Overture Maps Places; see places_dataset_info for the release, and note that counts are indicative rather than a register.

In pins 6
  • geo point required v15.0.0
    geo_point

    Point to search from.

  • categories v15.0.0
    array

    Array or comma-separated list of category groups. Accepts group ids (primary_education) or Dutch synonyms (basisschool, kroegen). Empty searches every category. Use places_categories to list them.

  • max results v15.0.0
    number

    Maximum number of results. Empty uses 10.

  • max distance (m) v15.0.0
    number

    Ignore anything beyond this distance in metres. Empty or 0 searches without a distance limit.

  • min confidence v15.0.0
    number

    Drop results below this Overture confidence (0–1). The signal is uncalibrated : median 0.80 across the Dutch dataset : so filtering may hide coverage as easily as it removes noise. Empty applies no filter.

  • dedup v15.0.0
    condition

    Collapse duplicate records for the same real place. On by default: Overture is not conflated, so one station can appear three times under name variants (Station Breda Centraal, Gare de Bréda, NS Station Breda). Merged results report merged_count and merged_names.

Out pins 6
  • results v15.0.0
    array

    Matching places. Each carries id, name, category_group, geo_point, distance_m, confidence, address, website, phone and merged_count.

  • nearest v15.0.0
    object

    The first result, for convenience. Empty when nothing matched.

  • nearest distance (m) v15.0.0
    number

    Distance to the nearest match in metres. Empty when nothing matched.

  • count v15.0.0
    number

    Number of results returned.

  • success v15.0.0
    condition

    True when the query ran. An empty result is still a success.

  • error v15.0.0
    value

    Error code when the query could not run: PLACES_NOT_AVAILABLE, GEO_POINT_MISSING_LAT_OR_LON.

A typical wiring for nearest places: number feeds the max_results pin; array with values feeds the categories pin; from city feeds the geo_point pin; the nearest out pin feeds custom field.

Studio canvas example for the nearest places block: typical wiring for nearest places.

Commonly used with

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

  • number: feeds into this block. Generates a valid number from the filled custom value in the blueprint.
  • array with values: feeds into this block. Creates a new array of given values.
  • get lat / lon: this block feeds into it. Returns the latitude and longitude of a given geo point.
  • get fields: feeds into this block. Gets the selected fields from the given object.
  • custom field: this block feeds into it. get the value of a custom field with a custom value block, or dynamic value.

Used in these guides

These documentation pages use or explain this block:

Version history

Introduced in v15.0.0.


Back to places Return to the main group to view all sub-groups Back to Places Return to the group to view all blocks within this group