Skip to content

JuliaEarth/GeoIO.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoIO.jl

Load/save geospatial data compatible with the GeoStats.jl framework.

GeoIO.jl uses various backend packages that are spread across different Julia organizations to load and save the universal representation of geospatial data described in the book Geospatial Data Science with Julia.

Usage

Loading/saving data from/to disk

The load and save functions are self-explanatory:

using GeoIO

table = GeoIO.load("file.shp")

GeoIO.save("file.geojson", table)

Additional keyword arguments are forwarded to the backends:

# read `.geojson` geometries with Float64 precision
table = GeoIO.load("file.geojson", numbertype = Float64)

# force writing on existing `.shp` file
GeoIO.save("file.shp", table, force = true)

Supported formats

To see the formats supported by GeoIO.jl, use the formats function. Below is the output generated on March 1st, 2025:

julia> GeoIO.formats()
┌───────────┬─────────────────┬───────────────┐
│ extension │      load       │     save      │
├───────────┼─────────────────┼───────────────┤
│   .csv    │     CSV.jl      │    CSV.jl     │
│ .geojson  │   GeoJSON.jl    │  GeoJSON.jl   │
│   .gpkg   │   ArchGDAL.jl   │  ArchGDAL.jl  │
│   .grib   │ GRIBDatasets.jl │               │
│  .gslib   │   GslibIO.jl    │  GslibIO.jl   │
│   .jpeg   │   ImageIO.jl    │  ImageIO.jl   │
│   .jpg    │   ImageIO.jl    │  ImageIO.jl   │
│   .kml    │   ArchGDAL.jl   │               │
│   .msh    │    GeoIO.jl     │   GeoIO.jl    │
│    .nc    │  NCDatasets.jl  │ NCDatasets.jl │
│   .obj    │    GeoIO.jl     │   GeoIO.jl    │
│   .off    │    GeoIO.jl     │   GeoIO.jl    │
│ .parquet  │  GeoParquet.jl  │ GeoParquet.jl │
│   .ply    │    PlyIO.jl     │   PlyIO.jl    │
│   .png    │   ImageIO.jl    │  ImageIO.jl   │
│   .shp    │  Shapefile.jl   │ Shapefile.jl  │
│   .stl    │    GeoIO.jl     │   GeoIO.jl    │
│   .tif    │  TiffImages.jl  │ TiffImages.jl │
│   .tiff   │  TiffImages.jl  │ TiffImages.jl │
│   .vti    │   ReadVTK.jl    │  WriteVTK.jl  │
│   .vtp    │   ReadVTK.jl    │  WriteVTK.jl  │
│   .vtr    │   ReadVTK.jl    │  WriteVTK.jl  │
│   .vts    │   ReadVTK.jl    │  WriteVTK.jl  │
│   .vtu    │   ReadVTK.jl    │  WriteVTK.jl  │
└───────────┴─────────────────┴───────────────┘

Please read the docstrings for more details.

Asking for help

If you have any questions, please contact our community.