CRSError: Invalid projection: EPSG:4326
See original GitHub issueHi, I’m working in a jupyter notebook and trying to specify the CRS of a geopandas dataframe, like so:
import geopandas as gpd
import pyproj
coords = df[['latitude','longitude']]
raw_gpspoints_gdf = gpd.GeoDataFrame(
coords, geometry=gpd.points_from_xy(coords['longitude'], coords['latitude']), crs="EPSG:4326")
However, every time I get the error:
CRSError: Invalid projection: EPSG:4326: (Internal Proj Error: proj_create: SQLite error on SELECT name, type, coordinate_system_auth_name, coordinate_system_code, datum_auth_name, datum_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM geodetic_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name)
My versions are:
import sys
import pyproj
import geopandas
print(sys.version)
print(pyproj.__version__)
print(geopandas.__version__)
3.8.6 | packaged by conda-forge | (default, Oct 7 2020, 19:08:05)
[GCC 7.5.0]
2.6.1.post1
0.8.1
and my pyproj directory is
pyproj.datadir.get_data_dir()
'/opt/conda/lib/python3.8/site-packages/pyproj/proj_dir/share/proj'
How do I resolve this issue?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:16 (7 by maintainers)
Top Results From Across the Web
CRSError: Invalid projection: epsg:4326: for geopandas
This code give you basic projection, known as WGS84: from pyproj import CRS crs=CRS('EPSG:4326'). if you need proj4, do this:
Read more >CRCError: Invalid Projection: EPSG:4326 for Sentinel API ...
To resolve the issue I created a new virtual environment and reinstalled modules using the following command:
Read more >Gotchas/FAQ - pyproj 3.5.0.dev0 documentation - GitHub Pages
CRSError : Invalid projection: +init=ESRI:54009 +type=crs: (Internal Proj Error: ... You likely want to start from EPSG:4326 (WGS84) for coordinates as ...
Read more >GIS: CRCError: Invalid Projection: EPSG:4326 for Sentinel API ...
GIS: CRCError: Invalid Projection : EPSG : 4326 for Sentinel API Script & AttributeError: module 'pyproj'Helpful? Please support me on Patreon: ...
Read more >CRSError: Invalid projection: epsg:4326: (Internal Proj Error ...
CRSError : Invalid projection: epsg:4326: (Internal Proj Error: proj_create: SQLite error on SELECT name, type, coordinate_system_auth_name, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is an issue with
pyproj
package. They even cover this exact error in their documentation: https://pyproj4.github.io/pyproj/stable/gotchas.html#internal-proj-error-sqlite-error-on-select. Yourpyproj
points to a database created for a different version. You need to specify the path to a correct data directory (see the docs). Proper reinstallation also often helps.Specifically in your case, it seems that you installed pyproj using pip (as a wheel, because it looks for PROJ data inside the pyproj package), and not with conda (although you are using a conda environment). It’s best to install all those packages with conda (especially for non-pure python packages such as pyproj)