问题描述
我正在尝试使用 Google地球工具箱绘制一些航路点.它的文档非常差,所以我认为这是一个很好的Stack Overflow问题.
I am trying to plot some waypoints using the Google-Earth toolbox. The documentation for it is pretty poor, so I figured this would be a good Stack Overflow question.
我有一个矩阵wypts
,该矩阵具有以十进制格式表示的经纬度坐标对(如果有人在宾夕法尼亚州立大学机场(SCE)上对此感到疑惑).
I have a matrix, wypts
that has pairs of latitude and longitude coordinates in decimal format (If anyone is wondering this over the State College Airport (SCE) in Pennsylvania).
wypts =
40.8489 -77.8492
40.8922 -77.8492
40.9355 -77.8492
40.9788 -77.8492
41.0221 -77.8492
41.0654 -77.8492
41.1087 -77.8492
41.1154 -77.8492
以下内容不能代替在宾夕法尼亚州绘制点,而不能在南极以外绘制任何内容:
The following does not work instead of plotting points in Pennsylvania, it plots nothing in the off the south pole:
output = ge_plot(wypts(:,1),wypts(:,2))
ge_output('wypts.kml',output)
推荐答案
您混合了自己的经度和纬度. ge_plot
的帮助文档说,第一个输入应为经度,第二个输入应为纬度.试试这个:
You have your latitudes and longitudes mixed up. The help documentation for ge_plot
says that the first input should be longitude, and the second input should be latitude. Try this:
output = ge_plot(wypts(:,2),wypts(:,1));
ge_output('wypts.kml',output);
这篇关于使用Matlab Google地球工具箱绘制纬度和经度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!