Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
GeoNearest
  • See Also
    • Nearest
    • GeoIdentify
    • GeoEntities
    • GeoWithinQ
    • GeoDistance
    • FindGeoLocation
    • GeoBoundingBox
    • GeoBounds
    • Element
    • LocalTime
    • WikipediaData

    • Entity Types
    • Country
    • AdministrativeDivision
  • Related Guides
    • Geographic Data & Entities
    • Geodesy
    • Cloud Execution Metadata
    • Locations, Paths, and Routing
    • See Also
      • Nearest
      • GeoIdentify
      • GeoEntities
      • GeoWithinQ
      • GeoDistance
      • FindGeoLocation
      • GeoBoundingBox
      • GeoBounds
      • Element
      • LocalTime
      • WikipediaData

      • Entity Types
      • Country
      • AdministrativeDivision
    • Related Guides
      • Geographic Data & Entities
      • Geodesy
      • Cloud Execution Metadata
      • Locations, Paths, and Routing

GeoNearest[enttype,loc]

returns the geographic entity of type enttype closest to the geo location loc.

GeoNearest[{reg1,reg2,…,regn},loc]

returns the nearest of the regi.

GeoNearest[{reg1val1,reg2val2,…,regnvaln},loc]

returns the vali corresponding to the nearest regi.

GeoNearest[{reg1,reg2,…,regn}{val1,val2,…,valn},loc]

returns the same result.

GeoNearest[{reg1,reg2,…,regn}Automatic,loc]

takes the vali to be successive integers i.

GeoNearest[spec,loc,n]

returns n nearest values.

GeoNearest[spec,loc,{n,r}]

returns up to n matches within a radius r of loc.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Entity Types  
Groups of Entities and Regions  
Historical Entities  
Options  
DistanceFunction  
Applications  
Properties & Relations  
Neat Examples  
See Also
Related Guides
Related Links
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • Nearest
    • GeoIdentify
    • GeoEntities
    • GeoWithinQ
    • GeoDistance
    • FindGeoLocation
    • GeoBoundingBox
    • GeoBounds
    • Element
    • LocalTime
    • WikipediaData

    • Entity Types
    • Country
    • AdministrativeDivision
  • Related Guides
    • Geographic Data & Entities
    • Geodesy
    • Cloud Execution Metadata
    • Locations, Paths, and Routing
    • See Also
      • Nearest
      • GeoIdentify
      • GeoEntities
      • GeoWithinQ
      • GeoDistance
      • FindGeoLocation
      • GeoBoundingBox
      • GeoBounds
      • Element
      • LocalTime
      • WikipediaData

      • Entity Types
      • Country
      • AdministrativeDivision
    • Related Guides
      • Geographic Data & Entities
      • Geodesy
      • Cloud Execution Metadata
      • Locations, Paths, and Routing

GeoNearest

GeoNearest[enttype,loc]

returns the geographic entity of type enttype closest to the geo location loc.

GeoNearest[{reg1,reg2,…,regn},loc]

returns the nearest of the regi.

GeoNearest[{reg1val1,reg2val2,…,regnvaln},loc]

returns the vali corresponding to the nearest regi.

GeoNearest[{reg1,reg2,…,regn}{val1,val2,…,valn},loc]

returns the same result.

GeoNearest[{reg1,reg2,…,regn}Automatic,loc]

takes the vali to be successive integers i.

GeoNearest[spec,loc,n]

returns n nearest values.

GeoNearest[spec,loc,{n,r}]

returns up to n matches within a radius r of loc.

Details and Options

  • In GeoNearest[enttype,loc], enttype can be specified as an Entity object, such as Entity["Country"], or as a string, such as "City".
  • Valid forms of enttype include:
  • "AdministrativeDivision"administrative division of any level
    "AdministrativeDivision1"first-level administrative division
    "AdministrativeDivision2"second-level administrative division
    "AdministrativeDivision3"third-level administrative division
    "Airport"airports
    "Bridge"bridges
    "Building"buildings
    "City"city
    "Country"country, territory, etc.
    "HistoricalCountry"historical countries, regions, empires, etc.
    "MilitaryConflict"military conflicts
    "Mountain"mountains
    "Ocean"oceans
    "USCounty"US counties
    "USState"US states
    "Volcano"volcanoes
    "ZIPCode"US ZIP codes
    Dated[ent,date]entities of type enttype in date
    Except[ent,enttype]entities other than ent of type enttype
    GeoVariant[enttype,variant]entities using variant regions
    EntityClass["type","class"]individual members of class
    type1|type2|…any of the typei
    Allany possible type
  • In GeoNearest[enttype,loc], loc can be any geo location object, including GeoPosition objects; geo entities of domains such as "City", "Country" or "HistoricalCountry"; Dated[…] objects; GeoVariant[…] expressions; and more.
  • Geographic regions can be specified as geo locations, an Entity or EntityClass object or a GeoGraphics primitive.
  • For domains of time-dependent entities, GeoNearest by default returns results corresponding to the moment of closest approach to the given location, which may itself also be time dependent.
  • A radius should be given as a Quantity object or the number 0.
  • GeoNearest[spec,loc,{All,r}] returns all results within radius r of loc.
  • GeoNearest always returns a list. If there are multiple nearest matches, GeoNearest[spec,loc] will return all of them.
  • GeoNearest[spec,loc,{n,r}] may return an empty list if there are no matches within the specified radius.
  • The following options can be given:
  • DistanceFunction "Boundary"how to compute distances for extended regions
    TimeConstraint30how many seconds to allow for computation
  • The following possible settings can be given for DistanceFunction:
  • "Boundary"minimum distance between any points in regions
    "Center"distance between centers of regions
    "SignedBoundary"distance to boundary, negative for interior points

Examples

open all close all

Basic Examples  (3)

Find your current or nearest country:

The country closest to the center of the Atlantic Ocean:

The five counties nearest to Chicago, Illinois, United States:

All volcanoes within a radius of 1000 miles from London:

Scope  (16)

Entity Types  (6)

The three countries closest to Australia:

Entity types can also be specified with Entity head:

Give countries whose closest point to Germany is closer than 100 kilometers:

Find entities that cover a particular point:

Return famous buildings within one of those extended regions:

The mountain or volcano closest to your location:

The US state other than California closest to San Francisco:

The country whose center is closest to Paris:

With the default variant "PrincipalArea", Paris is at zero distance from France:

Groups of Entities and Regions  (6)

The border of the continental United States to which the city of Saint Louis, Missouri, is closest:

Return the value corresponding to the border entity closest to Denver, Colorado:

An equivalent syntax:

The closest of several points to your current location:

The position in a list of the point closest to Chicago:

Using explicit labels:

Determine whether Germany is closest to a member of OPEC, the Baltic states or the British Commonwealth:

Determine to which of the following city pairs Greece is closest:

Historical Entities  (4)

GeoNearest with historical entities returns the closest entities that correspond to the same time period:

Use Dated with historical entities to specify a particular date or interval of dates:

Using Dated in the first argument gives results indicating the time of closest approach:

With a non-historical location, the search is performed geographically, regardless of dates:

Specifying date information for the location will give results that correspond to those dates:

Check that the dates correspond to years between 1750 and 1800:

Options  (1)

DistanceFunction  (1)

By default, distances are measured from the boundaries of extended regions:

With DistanceFunction->"Center", distance from the center of the entity is used:

Applications  (1)

Find the countries that fall at least in part within a given latitude/longitude region:

Plot them, together with the latitude/longitude region:

Properties & Relations  (2)

GeoIdentify is a specialized form of GeoNearest:

GeoNearest includes all entities, if any, at zero distance from an extended region:

GeoEntities only includes entities that overlap the region:

Neat Examples  (1)

Construct a function to find the shortest route from a given position to the nearest foreign country:

Compute the shortest path out of the country in which you are:

Make a map showing the shortest path:

See Also

Nearest  GeoIdentify  GeoEntities  GeoWithinQ  GeoDistance  FindGeoLocation  GeoBoundingBox  GeoBounds  Element  LocalTime  WikipediaData

Entity Types: Country  AdministrativeDivision

Related Guides

    ▪
  • Geographic Data & Entities
  • ▪
  • Geodesy
  • ▪
  • Cloud Execution Metadata
  • ▪
  • Locations, Paths, and Routing

Related Links

  • An Elementary Introduction to the Wolfram Language : Geocomputation

History

Introduced in 2014 (10.0) | Updated in 2024 (14.1)

Wolfram Research (2014), GeoNearest, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoNearest.html (updated 2024).

Text

Wolfram Research (2014), GeoNearest, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoNearest.html (updated 2024).

CMS

Wolfram Language. 2014. "GeoNearest." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/GeoNearest.html.

APA

Wolfram Language. (2014). GeoNearest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoNearest.html

BibTeX

@misc{reference.wolfram_2025_geonearest, author="Wolfram Research", title="{GeoNearest}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/GeoNearest.html}", note=[Accessed: 01-March-2026]}

BibLaTeX

@online{reference.wolfram_2025_geonearest, organization={Wolfram Research}, title={GeoNearest}, year={2024}, url={https://reference.wolfram.com/language/ref/GeoNearest.html}, note=[Accessed: 01-March-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English