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("file.shp")
GeoTables.save("file.geojson", table)
Additional keyword arguments can be passed to load
and save
functions. Valid
arguments are those accepted by GeoJSON.read
, GeoJSON.write
, Shapefile.Table
,
Shapefile.write
and ArchGDAL.read
. See below some examples:
# read `.geojson` geometries with Float64 precision
table = GeoTables.load("file.geojson", numbertype = Float64)
# force writing on existing `.shp` file
GeoTables.save("file.shp", table, force = true)
Please read the docstrings for more details.
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.
Asking for help
If you have any questions, please contact our community.