この境界ボックスで囲まれた国は?
ランダムに選んだ10ヶ国の周りに経緯度の矩形を描画する.実際の形を見ないで,いくつの国が分かるだろうか.
すべての国のリストを取る.
In[1]:=
![Click for copyable input](assets.ja/which-country-has-this-bounding-box/In_25.png)
Length[countries = EntityList[EntityClass["Country", All]]]
Out[1]=
![](assets.ja/which-country-has-this-bounding-box/O_16.png)
その中から10ヶ国をランダムに選ぶが,国名は伏せておく.
In[2]:=
![Click for copyable input](assets.ja/which-country-has-this-bounding-box/In_26.png)
sample10 = RandomSample[countries, 10];
これらの境界ボックスで囲まれている国はどこだろう.
In[3]:=
![Click for copyable input](assets.ja/which-country-has-this-bounding-box/In_27.png)
GeoGraphics[{EdgeForm[Red], GeoBoundsRegion /@ sample10},
GeoBackground -> "StreetMapNoLabels", GeoRange -> "World"]
Out[3]=
![](assets.ja/which-country-has-this-bounding-box/O_17.png)
ここをクリックして,何ヶ国分かったか見てみよう.
完全なWolfram言語入力を表示する