0

I need to find points (from a rather small dataset) which are close enough to a polyline. All coordinates are WGS84.

I think of some r-tree thing to reduce the data to just a few candidates which then have to be checked in more detail.

While i managed to do this using "great circle" arithmetic, i am sure this is too pedantic for the following reasons:

  • The segmentation of those polylines is quite high. A single segment of a polyline can be considered to be no longer than 10 km.
  • The points in question are not more than a few hundred meters away from segments.
  • The area in question is Europe, so the algorithm does not need to be valid for extreme (near pole?) conditions. Again: points don't need to be checked agains the whole polyline (which could be hundrets of kilometers). Only the "nearby" segments need to be considured.

Do i need to transform the WGS84 coordinates to

  • some local cartesian reference system
  • to a mercator system

Or can i even just calculate with "angle differences"? I know that this is just a matter of accuracy: I can accept an error which is below ~50 meters.

I highly appreciate your suggestions!

Henning
  • 1,289
  • 2
  • 11
  • 25
  • Try gis.stackexchange.com You so have many questions: > Do i need to transform the WGS84 coordinates to Local cartesian system is only for distance smaller 2 kilometers, so I would say use a mercator system. But I guess you don't need to transform your coordiantes. Look here: http://gis.stackexchange.com/questions/19760/how-do-i-calculate-the-bounding-box-for-given-a-distance-and-latitude-longitude – Matthias Hamann Nov 11 '16 at 10:31

1 Answers1

0
  1. On how to measure distance from point to polyline: you have to measure distances from all your points to all segments of a polyline. See Distance from a point to a polygon
  2. You can do without converting coordinates to cartesian (especially if the area is rather small, you don't mind 50 meters error and you don't need exact distances, just relative) See https://en.wikipedia.org/wiki/Decimal_degrees.
Community
  • 1
  • 1
Anton Shmelev
  • 75
  • 3
  • 7