Introduction
The Lambert 93 projection system is a conformal conic projection widely used in France for mapping purposes. However, for more universal use, it's often necessary to convert these coordinates into longitude and latitude using the WGS 84 system (EPSG:4326). To do this, we use the pyproj library, which allows conversion between different spatial reference systems.
Installing pyproj
If pyproj is not yet installed, you can install it using pip:
1 | pip install pyproj |
Or with Anaconda:
1 | conda install -c conda-forge pyproj |
Converting Lambert 93 Coordinates to Latitude and Longitude
Here is an updated example using the recommended method from pyproj:
1 2 3 4 5 6 7 8 9 10 11 12 13 | from pyproj import Transformer # Create a transformer object between EPSG:2154 (Lambert 93) and EPSG:4326 (WGS 84) transformer = Transformer.from_crs("EPSG:2154", "EPSG:4326", always_xy=True) # Lambert 93 coordinates x1, y1 = 882408.3, 6543019.6 # Convert to longitude and latitude longitude, latitude = transformer.transform(x1, y1) # Display results print(longitude, latitude) |
Output:
1 | 5.355651287573366 45.96240165432614 |
Code Explanation:
- Use of
Transformer.from_crs: This method replacesProjandtransform, which are deprecated in recent versions ofpyproj. - Parameter
always_xy=True: Ensures the coordinate order is(x, y)(i.e., longitude, latitude), unlike some projections that reverse the order. - Conversion with
transformer.transform(x, y): Applies the transformation to the given point.
Finding EPSG Codes
EPSG codes are standardized identifiers for spatial reference systems. Here are some useful references:
- EPSG:2154 : Lambert 93
- EPSG:4326 : World Geodetic System (WGS 84)
References
| Links | Site |
|---|---|
| Conformal Conic Projection of Lambert | Wikipedia |
| Lambert93_ConiquesConformes.pdf | geodesie.ign.fr |
| Coordinate Conversion - GIS Data - Scientific | geofree.fr |
| Google Map | coordonnees-gps.fr |
| Easily change coordinate projection systems in Python with pyproj | all-geo.org |
| SpatialReference Lambert 93 | spatialreference.org |
| SpatialReference WGS | spatialreference.org |
| Convert Lambert 93 to GPS Coordinates Latitude / Longitude (WGS84) JavaScript | GitHub |
| Converting projected coordinates to lat/lon using Python? | StackExchange |
| pyproj package | GitHub |
| World Geodetic System |
