Skip to content

Latest commit

 

History

History
85 lines (65 loc) · 3.38 KB

README.md

File metadata and controls

85 lines (65 loc) · 3.38 KB

GeoIO.jl

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

GeoIO.jl uses various backend packages spread across different Julia organizations to load a universal representation of geospatial data as discussed 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 January 3rd, 2024:

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    │   ArchGDAL.jl   │  ArchGDAL.jl  │
│   .tiff   │   ArchGDAL.jl   │  ArchGDAL.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.