Extract Data Points within a Closed Boundary.
13 ビュー (過去 30 日間)
古いコメントを表示
I have a large array of geographical data in which the first two columns are latitude and longitude respectively. Remaining columns contain other data like the prominance of a peak located at that particular lat and long. I also have a matrix of lattitude and longitude pairs that define the borders of a particular closed area like a State or Country (thanks to Chad Green's borders.m code in the File Share section).
What I need to do is extract all the data from the large array that are inside or on the border of the particular area I choose. I'm not trying to find the number of points within or on the boundary but looking for a new output matrix which contains the lat & long point along with the other associated column data from the original large array.
I'm guessing Matlab may already contain a function for this operation which is probably faster than any brute force code I would write. I don't have the mapping toobox, just basic Matlab.
Thanks
3 件のコメント
Image Analyst
2020 年 8 月 22 日
How large? Tens of millions of rows? Hundreds of millions of rows? Billions of rows? Anyway I think going down row-by-row using inpolygon() might be the approach to use.
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Geographic Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!