Forum Discussion

paulfromhouston's avatar
paulfromhouston
Frequent Visitor
1 year ago
Solved

make separate straight lines on map

I want to make multiple straight lines on map, each line has start point (lat and long) and end point (lat and long), I want to know the distance of each line between the start and end points. 

My data table is similar like below:

AA1, start_lat, start_long, end_lat, end_long;

BB1, start_lat, start_long, end_lat, end_long;

CC1, start_lat, start_long, end_lat, end_long;

...

Any suggestion?

Thank you,

Paul

  • Hello paulfromhouston,
    in power bi you could achieve it using Azure map visual
    you need to make sure that your tenent admin has given acccess 
    if yes then , u need to format your data in following type:
    AA1,start, lat, long;
    AA1,end, lat, long;
    then you can lat and long columns for visual and then u can add AA1 column or name column for "path id" for visual


    if this helps, please mark as solution

  • paulfromhouston's avatar
    paulfromhouston
    1 year ago

    Thank you, will test it later today and mark this as solution if it works for me. 🙂

4 Replies

  • Hi paulfromhouston  For this use Pandas to load the data table with start and end coordinates, calculate distances using Geopy, and use Folium to plot the lines. For each row, use PolyLine in Folium to draw a straight line between the start and end points. Skip adding markers; focus only on drawing lines to represent connections. Save the map as an HTML file to view the lines and distances visually.

  • Hello paulfromhouston,
    in power bi you could achieve it using Azure map visual
    you need to make sure that your tenent admin has given acccess 
    if yes then , u need to format your data in following type:
    AA1,start, lat, long;
    AA1,end, lat, long;
    then you can lat and long columns for visual and then u can add AA1 column or name column for "path id" for visual


    if this helps, please mark as solution

    • paulfromhouston's avatar
      paulfromhouston
      Frequent Visitor

      Thank you, will test it later today and mark this as solution if it works for me. 🙂