Wolfram 语言与系统 10.0 (2014)|旧版文档

此为更早版本的 Wolfram 语言文档查看最新文档(版本11.2)

GeoNearest

GeoNearest[enttype]
returns the geographic entity of type enttype closest to the current geo location.

GeoNearest[enttype,loc]
returns the geographic entity closest to the location loc.

GeoNearest[enttype,loc,n]
returns the n nearest entities.

GeoNearest[enttype,loc,{n,r}]
returns the n nearest entities within a radius r of loc.

更多信息和选项更多信息和选项

  • In GeoNearest[enttype,loc], enttype can be specified as an Entity object such Entity["Country"] or as a string such as .
  • GeoNearest[All,] will attempt to find all entities, regardless of type.
  • GeoNearest[enttype] uses the current setting for $GeoLocation.
  • The location loc can be specified as a GeoPosition or related point-like location object, an Entity object, or a GeoGraphics primitive.
  • A radius should be given as a Quantity object or the number .
  • GeoNearest[enttype,loc,{All,r}] returns all entities within radius r of loc.
  • 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

范例范例打开所有单元关闭所有单元

基本范例  (2)基本范例  (2)

Find your current or nearest country:

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

The country closest to the center of the Atlantic Ocean:

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

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

In[1]:=
Click for copyable input
Out[1]=
2014年引入
(10.0)