Trying to convert ETRS-TM35FIN coordinates in the EUREF-FIN projection to WGS84 in geopandas with this:

x = 429300
y = 7084490
df = pd.DataFrame([[x,y]],columns=['x','y'])

df['Coordinates'] = list(zip(df['x'],df['y']))
df['Coordinates'] = df['Coordinates'].apply(Point)
gdf = geopandas.GeoDataFrame(df,geometry='Coordinates')
gdf.crs = {'init':'epsg:3067'}
gdf = gdf.to_crs(epsg=4978)

Throws and error RuntimeError: b'geocentric transformation missing z or ellps'

If instead of gdf.crs = {'init':'epsg:3067'} I use PROJ4 string gdf.crs = {'+proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000'} I now get the error AttributeError: 'set' object has no attribute 'items'

I don't need this conversion to be accurate beyond one meter. So my impression is that I wouldn't actually need to change the projection, only to get the x,y coordinates to lat/lon

  • Side not: the reason that gdf.crs = {'+proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000'} does not work is because you actually passed a python set, it should either be the string (gdf.crs = '+proj=tmerc +lon_0=27 +k_0=0.9996 +x_0=500000') or a dict (gdf.crs = {'proj':'tmerc', 'lon_0':27, 'k_0':0.9996, 'x_0':500000}). If you do either of those, you get the same error message as with the epsg number .. – joris Oct 11 at 13:52
  • Another note, if you want WGS84, this is typically used as EPSG 4326. Doing gdf.to_crs(epsg=4326) seems to work. – joris Oct 11 at 13:53

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.