I'm trying to use GEOJSON files to visualise some data in Python using GeoPandas (GDAL, fiona, shapely, numpy, matplotlib are all installed). I'm having success in loading some files but not others; those that can be read appear to be pointers whilst lines and polygons cannot (this is based on the names of the files).
On using geopandas.read_file
I get the below error:
Traceback (most recent call last):
File "C:/......../PycharmProjects/Mapping/Mapping Code.py", line 41, in <module>
gambia_map = gpd.read_file(
File "C:\Python3.8\lib\site-packages\geopandas\io\file.py", line 127, in read_file
gdf = GeoDataFrame.from_features(f_filt, crs=crs, columns=columns)
File "C:\Python3.8\lib\site-packages\geopandas\geodataframe.py", line 300, in from_features
d = {"geometry": shape(f["geometry"]) if f["geometry"] else None}
File "C:\Python3.8\lib\site-packages\shapely\geometry\geo.py", line 44, in shape
return MultiPolygon(ob["coordinates"], context_type='geojson')
File "C:\Python3.8\lib\site-packages\shapely\geometry\multipolygon.py", line 64, in __init__
self._geom, self._ndim = geos_multipolygon_from_py(polygons)
File "C:\Python3.8\lib\site-packages\shapely\geometry\multipolygon.py", line 143, in geos_multipolygon_from_py
geom, ndims = polygon.geos_polygon_from_py(ob[l][0], ob[l][1:])
File "C:\Python3.8\lib\site-packages\shapely\geometry\polygon.py", line 509, in geos_polygon_from_py
ret = geos_linearring_from_py(shell)
File "shapely\speedups\_speedups.pyx", line 401, in shapely.speedups._speedups.geos_linearring_from_py
ValueError: GEOSGeom_createLinearRing_r returned a NULL pointer
Process finished with exit code 1```