@ErickChacon please update to GeoTables.jl v1.1, I’ve implemented the minimum interface necessary to save to disk as illustrated in the following example:
julia> using GeoStats
julia> geotable = georef((a=1:4, b=1:4))
4 MeshData{1,Float64}
variables (rank 1)
└─a (Int64)
└─b (Int64)
domain: 4 CartesianGrid{1,Float64}
julia> using GeoTables
julia> GeoTables.save("analysis.geojson", geotable)
"analysis.geojson"
julia> GeoTables.load("analysis.geojson")
4 GeoTable{1,Float64}
variables (rank 1)
└─a (Int64)
└─b (Int64)
domain: 4 GeometrySet{1,Float64}
Notice a few things:
-
The GeoInterface.jl cannot represent rich topological information that is needed for geometric processing. Notice how the original
CartesianGridis reloaded from disk as aGeometrySet, i.e. a soup of disconnected geometries. Many algorithms in Meshes.jl rely on neighborhood information, so I highly recommend that you stay away as much as possible from these geometry types used for IO. My general advise is to design your workflow in terms of Meshes.jl geometries, and only resort to the GeoInterface.jl for loading/saving data from/to disk. -
The only package I could find that provides the “save” functionality for the GeoInterface.jl is the GeoJSON.jl package. That means that you can only export to geojson at the moment.
-
You may encounter issues saving some types of geometries that are not supported by the GeoInterface.jl. If you have any trouble, please reach out in our community channel:
https://juliaearth.github.io/GeoStats.jl/stable/about/community.html