哪个国家有这个边界框?
在随机选择的 10 个国家的周围绘制经纬线矩形. 在没有看到这些国家的实际形状的情况下,你能识别出其中的几个国家?
取所有国家的列表.
In[1]:=
![Click for copyable input](assets.zh/which-country-has-this-bounding-box/In_25.png)
Length[countries = EntityList[EntityClass["Country", All]]]
Out[1]=
![](assets.zh/which-country-has-this-bounding-box/O_16.png)
随机选择其中的 10 个国家,但不要显示出它们的名字!
In[2]:=
![Click for copyable input](assets.zh/which-country-has-this-bounding-box/In_26.png)
sample10 = RandomSample[countries, 10];
哪些国家有这些边界框?
In[3]:=
![Click for copyable input](assets.zh/which-country-has-this-bounding-box/In_27.png)
GeoGraphics[{EdgeForm[Red], GeoBoundsRegion /@ sample10},
GeoBackground -> "StreetMapNoLabels", GeoRange -> "World"]
Out[3]=
![](assets.zh/which-country-has-this-bounding-box/O_17.png)
点击此处看你认出几个.
显示完整的 Wolfram 语言输入