GeoWithinQ

GeoWithinQ[reg,loc]
returns True if the location loc is contained within the region reg, and False otherwise.

Details and OptionsDetails and Options

  • In GeoWithinQ[reg,loc], reg can be specified as either an Entity object or an extended GeoGraphics primitive. The location loc can additionally be specified as a GeoPosition or related point-like location object.
  • GeoWithinQ accepts lists in both arguments, effectively calling Outer on the input lists.
  • With the option setting "FullyContained"->True, GeoWithinQ[reg,loc] will return True only if loc is completely contained in reg.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

New York City is in the United States:

In[1]:=
Click for copyable input
Out[1]=

But it is not in the state of Florida:

In[2]:=
Click for copyable input
Out[2]=

Are you currently in Champaign, Illinois?:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2014
(10.0)