地理位置网格
全新函数 CoordinateBoundsArray 和 CoordinateBoundingBoxArray 可用于创建有特定步长值的多维数组.
计算美国的经纬度边界.
In[1]:=
{lat, lon} = GeoBounds[Entity["Country", "UnitedStates"]]
Out[1]=
从其中生成步长为 2 度的坐标数组.
In[2]:=
arr = CoordinateBoundsArray[QuantityMagnitude@{lon, lat}, 2];
根据数组构建地理表格.
In[3]:=
grid = GeoGridPosition[arr, "Equirectangular"];
In[4]:=
pos = GeoPosition[grid]
Out[4]=
在地理地图上绘制这些坐标.
In[5]:=
graphics = GeoGraphics[Point[pos], GeoGridLines -> Automatic]
Out[5]=
在其他投影上绘制这些点.
In[6]:=
Show[graphics, GeoProjection -> "Mollweide"]
Out[6]=
In[7]:=
Show[graphics, GeoProjection -> "Mercator"]
Out[7]=