Skip to content

Instantly share code, notes, and snippets.

@louwersj
Created September 15, 2023 08:18
Show Gist options
  • Save louwersj/ab3c6b7c0b73bacd5f00d692f616dfd0 to your computer and use it in GitHub Desktop.
Save louwersj/ab3c6b7c0b73bacd5f00d692f616dfd0 to your computer and use it in GitHub Desktop.
convert Rijksdriehoek coordinates into Latitude and longitude
from pyproj import Proj, transform
def convert_rd_to_gps(eastings, northings):
# Define the Rijksdriehoek coordinate system
rd_proj = Proj(proj="sterea", ellps="bessel", lat_0=52.15616055555555, lon_0=5.3876388888889, x_0=155000, y_0=463000, k=1.0008035)
# Define the WGS84 coordinate system (GPS)
wgs84_proj = Proj(proj="latlong", datum="WGS84")
# Convert RD coordinates to GPS coordinates
longitude, latitude = transform(rd_proj, wgs84_proj, eastings, northings)
return latitude, longitude
# Rijksdriehoek coordinates
eastings = 111750
northings = 557250
# Call the function and get GPS coordinates
latitude, longitude = convert_rd_to_gps(eastings, northings)
# Print the individual coordinates
print(f"Latitude: {latitude}") # Print the latitude
print(f"Longitude: {longitude}") # Print the longitude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment