确定与Matlab海岸线的距离 [英] Determine distance from coastline in Matlab

查看:242
本文介绍了确定与Matlab海岸线的距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MATLAB中,我有一组纬度和经度对,它们表示美国的位置.我需要确定到最近海岸线的距离.

In MATLAB, I have an array of latitude and longitude pairs that represents locations in the United States. I need to determine the distance to the nearest coastline.

我认为MATLAB具有美国纬度/经度点的内置数据库.如何访问和使用它?

I think MATLAB has a built in database of lat/lon points of the United States. How do I access it and use it?

关于如何有效确定距离的任何建议?

Also any suggestions on how to efficiently determine the distance?

更新:后续问题:确定使用Meshm时垃圾箱的中心

推荐答案

load coast; 
axesm('mercator'); 
plotm(lat,long)

与Coast.mat在同一目录中的其他数据集可能更有用.

There are other datasets in the same directory as coast.mat that might be more useful.

然后我只需要找到到数据集中所有点的距离,并采用最短的距离即可.这将假定美国以外的海岸线是可以接受的答案.您将要使用距离函数,因为欧几里得几何形状不适用于此处.

I would then just find the distance to all the points in the dataset, and take the shortest distance. This would assume that coastlines outside of the US are acceptable answers. You will want to use the distance function since Euclidean geometry does not apply here.

这篇关于确定与Matlab海岸线的距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆