2

I'm using QGIS 1.8.0 to plot a global dataset showing the positions of aircraft in flight.

The data I have are .csv files with three columns: Latitude, Longitude, and angle of travel.

I assign the "angle of travel" column of data to the rotation field in the "Style" tab of the "Layer Properties" dialog window.

This works fine except that that the rotation angle does not take into account the angular distortion of the map projection.

This means that in places where the angular distortion is high, the flight path looks like a row of dominoes:

Flight paths in an area with high angular distortion

Whereas where the angular distortion is low the flight paths looks like a straight line, which is what I want.

So my question is:

In QGIS is there a way to synchronise the marker's rotation field (now called "angle" in QGIS 2.0.1) with the angular distortion in the map projection?

EDIT:

Since posting this question I have started using the new QGIS 2.0.1.
In QGIS 1.8.0 I don't think it was possible to do what I am asking, but in the new version it looks like it is. However, it requires a thorough understanding of the maths behind map projections, which I do not have.

In the "Style" tab of the "Layer Properties" dialogue window, when assigning "data defined properties" to the angle of the marker, it is now possible to open an "Expression string builder" dialogue window.

enter image description here

Here, I presume, it will be possible to enter a mathematical equation which modifies the angle of the marker so that it accounts for the angular distortion in any particular map projection.

The map projections I am interested in are mollweide (or other similar elliptical projection) for a global overview, and also the UTM zones.

The reasons for my map projection choices are:

Mollweide:
I like the look of mollweide for showing global trends.

UTM:
To make a complete visualization using all the data and revealing some of the lesser used routes clearly I will have to import and rasterize the data in geographic portions as I don't have enough RAM to deal with the entire dataset in one go.

I was thinking of using UTM zone strips, a bit like a set of globe gore, which I can then stitch back together once rasterized using Geocart.

The Mercator projection idea below is not ideal as it creates a pronounced narrowing of features near the poles, and there is a fair amount of air traffic in the north.
The conformal projection idea represents a lot more work for me, as many more tiles will be needed than if I use pole to pole UTM strips.

So, I'm still holding out for someone to tell me at least whether or not it's theoretically possible to type in a formula that will affect all the points in the correct way, if not the formulae themselves.

  • 3
    Why not use a map projection that does not have such distortion? You need a conformal projection with little or no grid convergence--the Mercator projection is ideal. – whuber Dec 15 '13 at 19:25
  • Thankyou. That works, and seems like the best idea if it can't be done any other way. – Martin Dec 15 '13 at 19:46
1
+50

if you need to represent your data in another projection, I suggest that you create (small) line segments in a conformal projection, then you can display your line segments in any projection.

alternatively, you can also use the re-projected coordinates of your points and the other end of your segment to measure your "distorted" bearing (use a small radius), store this value in a new field and use it for the symbol.

update with more details (for the second alternative):

  • add your table as points
  • project in a conformal projection
  • get the xy coordinates for the conformal projection in new fields Xconf and YConf ($X and $Y with calculate attribute)
  • compute the XY coordinates of the second point (Xconfb = "Xconf + cos(bearing) ; Yconfb = YConf + sin(bearing) )
  • add Xbis and Ybis as points in the conformal projection
  • project the new points in the original projection
  • get the xbis ybis coordinates for the original projection in new fields Xorigb and Yorigb ($X and $Y with calculate attribute)
  • compute the distorted bearing ( newbearing = atan ( (Yorigb - Yorig )/(Xorigb - Xorig)). Note that you need to handle the division by 0 (bearing North or South) and the direction (+0 or + 180°).

I have no simpler solution in mind, so you will need to put it in a script.

  • Thanks for the suggestions. The main reason I'd like a general formula that deals with all the points simultaneously is that its a global dataset with tens of millions of points. I plan to fill in the gaps where there is no reception by drawing lines, but visualising the actual data where I do have coverage is preferable as it reveals a lot about the traffic patterns that would be very difficult to replicate manually. – Martin Dec 22 '13 at 12:46
  • I didn't say that you had to do it by hand ! I am not QGIS expert, so I can't tell you how to build the segment automatically (in ArcGIS there is a tool called "bearing distance to line.) Maybe you should post another question with that specific problem. For the second part, I have updated my answer. – radouxju Dec 22 '13 at 18:50
  • Thankyou, yes I completely misunderstood the first time around. But now your suggestions seem to make perfect sense. I think even just the first one will solve my problem. – Martin Dec 22 '13 at 23:13

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.