← All tutorials · RavingDesk

Tutorial 14 of 14

Routes, distances and coordinates on the geo layer

Intermediate 7 min

Put rows with coordinates on an offline map, measure a route on the WGS84 ellipsoid, add distance and coordinate columns, and import or export GPX, KML and GeoJSON.

Open the city walk

Open the example City walk with geodesic distances. Its dataset Berlin landmarks (example data) has seven stops, one per row, with the columns place, lat and lon. The rows are in walking order.

The step Walking route through Berlin is a Geo layer. It runs in your browser, so the preview is ready at once and updates while you change a setting. You do not need to press Run.

Choose what to draw

  • Draw: A route in row order connects the rows from top to bottom. A closed loop (back to the first row) adds the leg back to the start. Points only draws the stops without lines.
  • Latitude column and Longitude column take signed decimal degrees. (automatic) picks columns named like lat/latitude and lon/lng/longitude.
  • Or one column with complete coordinates is for text such as 52°31′12″N 13°24′18″E, UTM (33U 391779 5820072), MGRS grid references or plus codes. When set, it is used instead of the two columns. Different notations in the same column are fine.
  • Label column names the numbered points on the map.
  • Map view: Zoom to the points or Whole world.

Read the numbers

Under the map, Route length (geodesic) shows 4.156 km for the walk. That is the shortest path between the stops over the WGS84 ellipsoid, the shape GPS uses. Spherical estimate (Haversine) gives 4.148 km, and Difference of the sphere shows how much a simple sphere formula would be off (−7.9 m here). Direct distance first → last is 2.276 km: Reichstag to TV Tower in a straight line.

Open 6 legs of the route for each leg's distance, its Initial bearing (°) and Final bearing (°) from true north, and the Cumulative (km) distance. Rows that could not be placed (empty cells, text that is no coordinate, latitude and longitude that look swapped) are listed under rows were not placed on the map with the reason.

These are the same numbers as the RavingDesk Geodesic Distance & Bearing Calculator, which uses the same engine.

Add columns to the dataset

Under Add columns to the dataset:

  • Add distance columns writes Leg distance (km), Cumulative distance (km) and Bearing of the leg (°) into the dataset. If you enter a Reference point (optional), for example your hotel as 52.5163, 13.3777, you get the distance and bearing from that point to every row instead.
  • Coordinate format with Add a coordinate column writes every row's position in another notation: DMS, DDM, decimal degrees with N/S/E/W, UTM, MGRS grid reference, plus code, Maidenhead locator, geohash or Web Mercator metres.

Both actions take a snapshot first, and Ctrl+Z undoes them.

GPS files in and out

Data › Open data file… also accepts GPX, KML and GeoJSON files. Every point becomes a row with name, kind (waypoint, route point, track point…), part, lat, lon, elevation and time. Add a Geo layer step to that dataset to see the track and its length.

To take your route elsewhere, use the buttons under the map: SVG and PNG for the picture, and GeoJSON, GPX (for GPS devices and hiking apps) or KML (Google Earth) for the points and the route.

Limits

The map is an offline overview with a Natural Earth land outline. It has no streets, map tiles or address search. Distances follow the ellipsoid, not roads or paths, and ignore heights. MGRS works from 80°S to 84°N, and all coordinates are WGS84.

Ready to try it?

Launch RavingDesk →