4

I have QGIS loaded on a couple of (Linux) computers, but by and large have used it as little more than an improved "Google Earth" with attempts at getting live data updates etc.; I've not seriously investigated scripting or advanced facilities.

I have two locations, one in the UK and the other in Germany. How can I plot on a map the line (a hyperbola?) that represents all points which are 100 km nearer the UK site than the German one?

7

This seems to be a classical case for a Two-point equidistant projection, see: Wikipedia: Two-point equidistant projection and ArcGIS: Two-point equidistant.

  1. Create a custom projecton, based on the pre-installed Sphere_Two_point_Equidistant projection (ESRI:53031) with the two points in England and Germany as the two points.

    For my example of London (51 N, 0 E) and Berlin (52 N, 13 E), I used this definition: +proj=tpeqd +lat_1=51 +lon_1=0 +lat_2=52 +lon_2=13 +x_0=0 +y_0=0 +R=6371000 +units=m +no_defs - replace the values of +lat_1, +lon_1, +lat_2 and +lon_2 with the coordinates of your two points.

  2. Apply this custom projection and create the middle line (perpendicular bisector) of your two points.

  3. Densify the line, thus add vertices in a regular interval (like 5 km) using Menu Processing / Toolbox / Points along geometry so that when reprojecting, the line will follow the same ground-points on the earth and will not just be a straight line between start- and endpoint with the inevitable distortions of the selected projection.

  4. If you only wanted the middle line (all points with same distance from London and Berlin), you could skip this step and proceed immediately to step 5. But you want the points that are 100 km nearer to London. To do this properly, you should use a geodesic buffer (the link shows how to do that in QGIS). Buffer the points from step 3, dissolve the buffers, convert the polygon to lines and keep only the left line: that's the line you want.

  5. If you want the middle line (same distance from London and Berlin), re-connect the densified points created in step 3, cretate a new line with Points to path - it will be identical in this custom projection, but when you visualize it on another projection, you'll see the difference.

  6. Now you can change the projection of the map canvas (project CRS) and you will see the line/hyperbola.

Screenshot 1: red middle line (without shifting of 100 km) between London and Berlin (red dots), displayed on a map canvas in EPSG:3857 (web mercator):

enter image description here

Screenshot 2: middle line in black (equidistant to London and Berlin, same line as in first screenshot) and red line created in step 4 (100 km nearer to London). As you would expect due to the increasing distortion of Mercator projection, the distance between both lines here increases towards the poles (but in fact remains constant on the globe):

enter image description here

Screenshot 3: Both lines exported as kml-file in EPSG:4326 and visualized in Google Earth: they are indeed parallel:

enter image description here

5
  • I learned a new projection today. Thanks!
    – wingnut
    May 5 '21 at 5:12
  • Thanks very much for that, I just about follow it and in fact the line is an adequate solution (even if the UK point were in Cumbria, the line wouldn't run over Finland). May 5 '21 at 6:33
  • I added an important adjustion to the "100 km nearer" part, using geodesic buffers
    – Babel
    May 5 '21 at 9:10
  • Thanks very much for the edited-in addition. The sort of problem that I was considering was similar to Decca etc. navigation, if I need to come back to it in more detail I'll obviously need to give some consideration to why one is hyperbolic and the other effectively straight-line... as @Babel has demonstrated earlier it might be entirely an issue of projection. May 5 '21 at 9:45
  • I guess it also depends on scale: for shorter distances, you could ignore the shape of the earth and calculate on a flat pane. For larger distances, however, earth's curvature has to be considered. But in case of Decca navigation, also the properties of the transmitter/the signal must be considered - how do they behave, what effective shape does the diffusion pattern of the signal have? The solution here is just based on distances on earth's surface.
    – Babel
    May 5 '21 at 9:51
4

On a map, you could make 2 rasters (rectangular grids). One would have the distance to the German location, and the other to the point in the UK. You could then use the Raster Calculator to highlight cells where the difference between them is less than 100 km. This would create a third grid, which you would display on a map.

There are probably more elegant solutions that generate the hyperbola from a formula. But if the display is purely visual, then just make the grid spacing smaller for higher resolution.

Note that depending on your projection, things like this don't work very well at long distances. The Haversine formula may be of assistance in creating a vector solution on unprojected data. Then you would sample the solution trajectory and generate points from it, linking them as a path in QGIS (points to paths in the Processing toolbox).

1
  • Thanks very much, I'll have a play with that tomorrow. In practical terms projecting the putative hyperbola by eye over longer distances would be entirely adequate... even though this obviously resembles Decca etc. I'm not aiming for substantial precision. Meanwhile, if anybody has any other ideas I remain interested to hear them. May 4 '21 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.