Why is my EPSG:3068 to WGS84 projection not accurate?

المشرف العام

Administrator
طاقم الإدارة
I need to project EPSG:3068 (Soldner Berlin) to lat/long.

It works fine with https://epsg.io/3068/map, but I'm looking for a way to do it with a Python script.

I tried both pyproj and the epsg.io API:

from pyproj import Projimport jsonimport urllib2# projection with pyprojp1 = Proj(init='epsg:3068')lon, lat = p1(26912,16806,inverse=True)# projection with the espg.io APIdata = json.load(urllib2.urlopen('http://epsg.io/trans?x=26912&y=16608&z=0&s_srs=3068&t_srs=4326'))But both are a bit off the actual location (in Berlin):

The epsg.io marker in the middle is correct. The upper right one is the location that I get from pyproj. The lower left marker is from the epsg.io API.

How can I avoid the discrepancies and get the correct result in Python?

P.S.: Code for creating the map:

import foliummap_1 = folium.Map(location=[lat, lon], zoom_start=100)map_1.simple_marker([lat, lon], popup='pyproj')map_1.simple_marker([52.47825965, 13.4327974], popup='epsg.io')map_1.simple_marker([float(data['y']),float(data['x'])], popup='epsg.io API')map_1.create_map(path='mthood.html')

أكثر...
 
أعلى