フィルターのクリア

GPS location bounding box

1 回表示 (過去 30 日間)
Trevor Harris
Trevor Harris 2018 年 3 月 27 日
コメント済み: Trevor Harris 2018 年 3 月 27 日
Hey all,
I'm not sure if "bounding box" is the correct term or not, so my apologies if that's misleading. I'm tracking the location of a ship and I'd like to know if its within a certain operational zone or not. For example, I'd like to know if the vessel is on Lake Huron, Lake Superior, the Welland Canal, etc... I can set up a rectangular box easily enough and use gt and lt to determine its location, but the problem is more complex than that. I'd like to setup a series of non-overlapping shapes (not just a box), and given a coordinate, determine which box that coordinate lies within. Has anyone had any experience doing this and could point me in the right direction?
Thanks a million! Trevor

回答 (1 件)

Jan
Jan 2018 年 3 月 27 日
For the solution of the actual problem in Matlab it does not matter, if you process GPS coordinates of a ship, or the color or cookies or the price of stocks.
What are the inputs you have in Matlab? Please provide a small meaningful example. Then it is easier to suggest some code. I assume inpolygon() will solve the problem directly.
  1 件のコメント
Trevor Harris
Trevor Harris 2018 年 3 月 27 日
Sorry, but I misunderstand your confusion. I have lat and long coordinates. Two numbers. I was giving the specific example for contextualisation, and you may ignore it should you wish.
The inpolygon function sounds promising, I'll have a look! Thanks!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAutomotive についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by