In my Python Pandas project I have a .csv file with geographic coordinates and want to transform it into lat,lon format.
the last weeks I successfully used the following code to make it work.
import pandas as pd
import numpy as np
import pyproj as pp
def key():
df = pd.read_csv('POI_Untersuchungsgebiet.csv')
utm2geo = pp.Proj(init='epsg:25832')
df[['lon', 'lat']] = df.apply(lambda row: utm2geo(row['x'], row['y'], inverse=True), axis=1).apply(pd.Series)
key_columns = ['fclass', 'lon', 'lat', 'code', 'Kategorie']
df = df[key_columns]
return df
Since today I get the following error message
Invalid projection: +init=epsg:25832 (Internal Proj Error: proj_create: SQLite error on SELECT name, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM projected_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name)
Any ideas what the reason could be?
You're likely using a PROJ < 8 library with a proj.db from PROJ 7.2 or 8. Check PROJ_LIB
.