# 找出美国最内部的点

Interior Point

 In[1]:= Xpolygon = Entity["Country", "UnitedStates"]["Polygon"]; coordinates = polygon[[1, 1, 1]];

 In[2]:= Xdistances = MapThread[GeoDistance, {coordinates, RotateLeft[coordinates]}]; accumulateddistances = Accumulate[QuantityMagnitude[distances]];
 In[3]:= XListPlot[accumulateddistances]
 Out[3]=

 In[4]:= Xfirst = First[accumulateddistances]; last = Last[accumulateddistances]
 Out[4]=

 In[5]:= Xf = Interpolation[Transpose[{accumulateddistances, coordinates}], InterpolationOrder -> 0]
 Out[5]=

 In[6]:= XGeoGraphics[{GeoStyling[Opacity[0.03], Purple, EdgeForm[ Directive[Thin, Darker[Purple]]]], (GeoDisk[#1, Quantity[650, "Miles"]] &) /@ f[Range[first, last, last/300]], GeoStyling[EdgeForm[Yellow], Opacity[0]], polygon}, GeoRange -> GeoBounds[polygon], GeoBackground -> None, ImageSize -> Large]
 Out[6]=

 In[7]:= Xpoint = GeoPosition[{39.2, -98.2}];

 In[8]:= Xcities = GeoNearest["City", point, 30]
 Out[8]=

 In[9]:= XGeoDistance[cities, point]
 Out[9]=

 In[10]:= XGeoDistance[cities, Polygon@GeoPosition@polygon[[1, 1, 1]], DistanceFunction -> "SignedBoundary"]
 Out[10]=

 In[11]:= XGeoGraphics[{GeoStyling[Opacity[0.03], Purple, EdgeForm[ Directive[Thin, Darker[Purple]]]], (GeoDisk[#1, Quantity[650, "Miles"]] &) /@ f[Range[first, last, last/300]], GeoStyling[EdgeForm[Yellow], Opacity[0]], polygon, Polygon[Entity[ "AdministrativeDivision", {"Kansas", "UnitedStates"}]], Blue, PointSize[Small], Point[cities], Red, Point[cities[[1]]]}, GeoRange -> GeoBounds[polygon], GeoBackground -> None, ImageSize -> Large]
 Out[11]=

## Mathematica

Questions? Comments? Contact a Wolfram expert »