gives the country entity for the current setting for $GeoLocation.
$GeoLocationCountry
gives the country entity for the current setting for $GeoLocation.
Examples
open all close allBasic Examples (1)
Applications (2)
Find the distance from your current location to the border of the country, returned as a negative value:
GeoDistance[Here, $GeoLocationCountry, DistanceFunction -> "SignedBoundary"]Find the first-level administrative divisions of the country of your current location:
$GeoLocationCountry["AdministrativeDivisions"]Find more data about the country:
$GeoLocationCountry["Population"]Properties & Relations (3)
$GeoLocationCountry gives the nearest country to your current $GeoLocation:
$GeoLocation$GeoLocationCountry$GeoLocationCity gives the nearest city to your current $GeoLocation:
$GeoLocationCity$GeoLocationCountry performs a GeoNearest call to find the nearest country to your current location:
GeoNearest["Country", GeoPosition[{50, 60}]]Block temporarily the value of $GeoLocation to simulate that you are located at that position:
Block[{$GeoLocation = GeoPosition[{50, 60}]},
$GeoLocationCountry
]$GeoLocationCountry is automatically set, even if $GeoLocation is at sea:
$GeoLocation = GeoPosition[{0, 0}]$GeoLocationCountryGeoGraphics[{GeoMarker[$GeoLocation], Polygon[$GeoLocationCountry]}]Reset your current $GeoLocation:
$GeoLocation = FindGeoLocation[]Possible Issues (1)
$GeoLocationCountry cannot be set independently of $GeoLocation:
$GeoLocationCountry = Entity["Country", "UnitedStates"]Instead, set $GeoLocation to a location included in that country:
$GeoLocation = GeoPosition[Entity["City", {"NewYork", "NewYork", "UnitedStates"}]]Then $GeoLocationCountry will be automatically set:
$GeoLocationCountryRestore your current $GeoLocation:
$GeoLocation = FindGeoLocation[]Tech Notes
History
Text
Wolfram Research (2014), $GeoLocationCountry, Wolfram Language function, https://reference.wolfram.com/language/ref/$GeoLocationCountry.html.
CMS
Wolfram Language. 2014. "$GeoLocationCountry." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$GeoLocationCountry.html.
APA
Wolfram Language. (2014). $GeoLocationCountry. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$GeoLocationCountry.html
BibTeX
@misc{reference.wolfram_2026_$geolocationcountry, author="Wolfram Research", title="{$GeoLocationCountry}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/$GeoLocationCountry.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_$geolocationcountry, organization={Wolfram Research}, title={$GeoLocationCountry}, year={2014}, url={https://reference.wolfram.com/language/ref/$GeoLocationCountry.html}, note=[Accessed: 12-June-2026]}