GeoTables.jl
Load geospatial tables from known file formats and convert the geometries to Meshes.jl geometries that are compatible with the GeoStats.jl ecosystem.
Geometries are loaded in pure Julia using packages such as Shapefile.jl and GeoJSON.jl. This means that there are no dependencies on heavy external libraries (e.g. GDAL).
Usage
The package provides a single load
function to load data as a
Tables.jl table
that implements the Meshes.Data
trait. This means that this
table can be passed directly to GeoStats.jl as geospatial data:
julia> using GeoTables
julia> table = GeoTables.load("/path/to/file.shp")
4 GeoTable{2,Float64}
variables
└─ACRES (Union{Missing, Float64})
└─Hectares (Union{Missing, Float64})
└─MACROZONA (Union{Missing, String})
└─PERIMETER (Union{Missing, Float64})
└─area_m2 (Union{Missing, Float64})
domain: 4 GeometrySet{2,Float64}
The result can be easily converted into any other table type:
using DataFrames
df = table |> DataFrame
and converted back to geospatial data with:
using GeoStats
df |> GeoData
Asking for help
If you have any questions, please contact our community.