質問

I have a Java project to plot properties to geo co-ords. It does not need to be super accurate, within 10+ metres is fine.

I have searched Haversine formulas, and midpoint formulas, but I can't see how they solve my problem:

I have a set of coords for corner and end lot properties. I know that there are for example, 6 properties between these two known points.

I am no maths or GIS expert, so I wanted an informed opinion if the following strategy si workable or rubbish:

Take the difference between LAT and LNG A and B. Divide that number by the number or properties. Will this work, or is there a better way of doing this?

Your answer is really appreciated!

役に立ちましたか?

解決

You can use formulae from spherical geometry as they are presented e.g. in Calculate distance, bearing and more between Latitude/Longitude points. In the following I will refer to this page.

  1. Calculate the bearing theta between the two given points P1 and P2 (use formula for Bearing).
  2. Calculate the distance d between the two given points P1 and P2 (use formula for Distance).
  3. Calculate any point P on the line between P1 and P2, given the distance D from P1, in your case D = d/6, D = 2d/6, ... Use the formula under Destination point given distance and bearing from start point.

ADDED: A running JS program with source code is on jsfiddle.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top