evetion / GeoDataFrames.jl

Simple geographical vector interaction built on top of ArchGDAL
https://www.evetion.nl/GeoDataFrames.jl/dev/
MIT License
67 stars 6 forks source link

Can't write a geojson file #65

Closed jjgecon closed 6 months ago

jjgecon commented 6 months ago

Hi I tried to write a .geojson file from a GeoDataFrame and I get a GDAL error.

import GeoDataFrames as GDF
using DataFrames

coords = zip(rand(10), rand(10))
df = DataFrame(geometry=createpoint.(coords), name="test");

GDF.write("test_points.geojson", df)

yields the following error message when trying to write the geojson

ERROR: GDALError (CE_Failure, code 10):
        Pointer 'hDefn' is NULL in 'OGR_F_Create'.

These are the versions I have

⌅ [c9ce4bd3] ArchGDAL v0.9.3
⌃ [62cb38b5] GeoDataFrames v0.3.1
evetion commented 6 months ago

Could you update to a newer version? Given the ^ you should be free to update to at least v0.3.4 (]up GeoDataFrames). Ideally you would upgrade further, but it seems you're limited by a fixed ArchGDAL 0.9. You can check why by doing add ArchGDAL@v0.10.

jjgecon commented 6 months ago

I updated julia to a newer version 1.10 from 1.9 and I got the new versions. It solved the problem