Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jsteffe
Helper III
Helper III

Convert Lambert 93 GPS to latitude / longitude

Hello,

I get an Excel file with lambert 93 GPS points
Example :

X93Y93
389003.922835266324484.1235129

 

I would like to convert into a GPS point with latitude and longitude so taht I can use it in a Map visual :

pointGPS
    -0.875659260   43.950656461

 

Thanks for your help,

Jérôme

1 ACCEPTED SOLUTION
AmiraBedh
Resident Rockstar
Resident Rockstar

While I strongly believe that you can do the conversion before getting into Power BI, here is an old thread :

 

https://community.fabric.microsoft.com/t5/Power-Query/Convert-coordinates-lambert-93-Coordinate-X-Co...

 

Otherwise I would go for using Python for example :

from pyproj import Proj, transform

lambert93 = Proj(init='epsg:2154')  # Lambert 93
wgs84 = Proj(init='epsg:4326')  # GPS coordinate system, WGS84

def convert_lambert93_to_wgs84(x, y):
    lon, lat = transform(lambert93, wgs84, x, y)
    return lat, lon

# Example of conversion
x93, y93 = 389003.92283526, 6324484.1235129
lat, lon = convert_lambert93_to_wgs84(x93, y93)
print(f"Latitude: {lat}, Longitude: {lon}")

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

3 REPLIES 3
AmiraBedh
Resident Rockstar
Resident Rockstar

While I strongly believe that you can do the conversion before getting into Power BI, here is an old thread :

 

https://community.fabric.microsoft.com/t5/Power-Query/Convert-coordinates-lambert-93-Coordinate-X-Co...

 

Otherwise I would go for using Python for example :

from pyproj import Proj, transform

lambert93 = Proj(init='epsg:2154')  # Lambert 93
wgs84 = Proj(init='epsg:4326')  # GPS coordinate system, WGS84

def convert_lambert93_to_wgs84(x, y):
    lon, lat = transform(lambert93, wgs84, x, y)
    return lat, lon

# Example of conversion
x93, y93 = 389003.92283526, 6324484.1235129
lat, lon = convert_lambert93_to_wgs84(x93, y93)
print(f"Latitude: {lat}, Longitude: {lon}")

Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Thanks for your answer but I don't understand where you put your code : "

from pyproj import Proj, transform

...

use it before going to Power BI. (the language is Python)


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.