GeoWithinQ

GeoWithinQ[reg,loc]

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

GeoWithinQ[reg]

represents an operator form of GeoWithinQ that can be applied to a location.

Details 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.
  • GeoWithinQ[reg][loc] is equivalent to GeoWithinQ[reg,loc].

Examples

open allclose all

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]=

Scope  (5)

Options  (1)

Applications  (1)

Properties & Relations  (2)

See Also

GeoIdentify  GeoEntities  GeoNearest  MemberQ  RegionMember  GeoBounds  GeoBoundingBox  GeoVisibleRegion

Introduced in 2014
(10.0)
| Updated in 2017
(11.1)