I have a log file with thousands of geo coordinates:


I now need a way to draw a point and/or a track for every coordinate with tikz or pgfplots.

This simple example provides only a perpendicular line. It seams, that the values after the dots haven't enough impact.

\pgfplotsset{compat = newest}

        \addplot [mark=o, blue] table[x=flight-latitude, y=flight-longitude, col sep=semicolon]{data/hover-data-obstacleState-5.txt};
  • Why doesn't that work? Can you show a complete example and explain what is wrong? (Except for the obvious, that pgfplots doesn't do map projections.) – Torbjørn T. Apr 8 '18 at 11:50
  • Hm, so the problem is essentially the limited precision of pgf. I don't really have any good ideas. – Torbjørn T. Apr 8 '18 at 13:01
  • I am actually not too surprised that there are problems, given that the first two coordinates are identical. I guess it will be difficult for any program to draw something that is orthogonal to this line segment. – user121799 Apr 8 '18 at 14:15
  • What is perpendicular line ? A vertical line ? This looks normal if all the first coordinates are identical. – Kpym Apr 9 '18 at 5:39
  • OT for this forum, but in general you should convert lat/lon to a grid (like UTM) before trying to plot them on a flat piece of paper. When you do this, you can also scale to values that makes sense to your plotting system. But this sort of conversion is beyond the scope of pgfplots etc. Have you thought of pre-processing your data into a suitable for with something like perl or python that will have suitable libraries for converting from lat/long to a suitable grid? – Thruston Apr 9 '18 at 10:03

Your Answer

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

Browse other questions tagged or ask your own question.