Find points are located at a radial distance of 20m from a point

I have an ascii file, with two columns. The first has Latitude and the second has longtitude. Also I have one point (lets call it "MYPOINT") with spesific latitde and longtitude. I would like with the base of MYPOINT to find all the point in the radious/cirle distance of 20km (For example from the 100 points, the points that are located at a radial distance of 20m from the MYPOINT.
Which functions should I use?

回答 (1 件)

Cris LaPierre
Cris LaPierre 2021 年 1 月 1 日

0 投票

Generate the points that make up the circle around myPoint, then use the inpolygon function to identify the points that are within the circle.

3 件のコメント

Ivan Mich
Ivan Mich 2021 年 1 月 1 日
well, I use this function:
(deg2km(distance(lat1,lon1,lat,lon)))
In order to calculate distance between MYPOINT and several point. I would like to keep only the point that have distance between 5 and 20km from MYPOINT .
What modifications should I make in my script?
Ivan Mich
Ivan Mich 2021 年 1 月 1 日
lat1, lon1, coordinates from several points and lat lon the coordinates from my stable point (MYPOINT)
Cris LaPierre
Cris LaPierre 2021 年 1 月 1 日
I know nothing about your script, and inpolygon now nothing about units. Look at the examples in the linked page for inpolygon and adapt to work with your data.

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

質問済み:

2021 年 1 月 1 日

コメント済み:

2021 年 1 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by