How can I draw great circle rays starting from a single given point P (for example, from coordinate [34 N, 116 W] in this map) and along directions D1, D2, ... (for example, 30, 45 and 135 degrees) in QGIS? I do not have any shape files or other vectors for the lines. All I have is a point which can either be imported or selected interactively.
Note that I'd like to plot rays, not paths, since I don't have a destination point (only the direction). However, the map will finally be clipped to its extents, so if it makes things simpler, I can also generate points outside the map with the desired direction and import them.
Answer
It works for me this way:
- Create a text file with the following content:
Nr;WKT
1;Linestring (0 0, 0 19113000)
- Create a custom CRS around the point of your interest:
+proj=aeqd +lat_0=51 +lon_0=7 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs
Note that I took the projection on a sphere, and my Linestring takes 3 times the radius. Set project CRS to that CRS.
Install the the
CAD Tools
PluginImport the text file as
Delimited Text
with Semicolon as separator and your custom CRS.In the 7th part of the CAD Tools Toolbar, click on
Select Vertex and Object
, then click on the line, and the center point (0;0)click on the neighbouring icon
Rotate Object
. Enter an angle (from true North). You will get an error message, but see the line created.Carry on with all angles you want
Set the
Cad LayerLines
Layer to edit modeUse
Vector -> Geometry Tools -> Densify
to add 100 intermediate points on all lines.Save the layer, and toggle edit mode off
Change Project CRS to EPSG:3857, and add a Layer from Openlayers plugin.
You get this picture:
If you want great circles for another point, all you have to do is create another custom CRS, and set the CADLinesLayer to that CRS.
No comments:
Post a Comment