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 from disk in pure Julia whenever possible using packages such as Shapefile.jl and GeoJSON.jl, or (down)loaded from the internet using the GADM.jl package.
Usage
Loading/saving data from/to disk
The load
and save
functions are self-explanatory:
using GeoTables
table = GeoTables.load("/path/to/file.shp")
GeoTables.save("/path/to/file.geojson", table)
Loading data from GADM
The gadm
function (down)loads data from the GADM dataset:
julia> GeoTables.gadm("BRA", depth = 1)
Please read the docstring for more details.
Performance tips
The result can be easily converted into any other geotable type
to avoid converting the geometries every time the underlying
domain is queried. For example, assuming that table
has been
loaded with the functions above, the following code can be used
to convert the table to pure Julia geometries:
using GeoStats
table |> GeoData
Asking for help
If you have any questions, please contact our community.