Skip to content

Commit

Permalink
Document the options (#121)
Browse files Browse the repository at this point in the history
* Document the options

* Fix punctuation

* Add more docs

* Fix typo

* Fix typo
  • Loading branch information
eliascarv authored Sep 24, 2024
1 parent a921c30 commit 04ef065
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/load.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,50 @@ are forwarded to the backend packages.
Please use the [`formats`](@ref) function to list
all supported file formats.
## Options
### OFF
* `defaultcolor`: default color of the geometries if the file does not have this data
(default to `RGBA(0.666, 0.666, 0.666, 0.666)`);
### CSV
* `coords`: names of the columns with point coordinates (required option);
* Other options are passed to `CSV.File`, see the CSV.jl documentation for more details;
### VTK formats (`.vtu`, `.vtp`, `.vtr`, `.vts`, `.vti`)
* mask: name of the boolean column that encodes the indices of a grid view (default to `:MASK`).
If the column does not exist in the file, the full grid is returned;
### Common Data Model formats (NetCDF, GRIB)
* `x`: name of the column with x coordinates (default to `"x"`, `"X"`, `"lon"`, or `"longitude"`);
* `y`: name of the column with y coordinates (default to `"y"`, `"Y"`, `"lat"`, or `"latitude"`);
* `z`: name of the column with z coordinates (default to `"z"`, `"Z"`, `"depth"`, or `"height"`);
* `t`: name of the column with time measurements (default to `"t"`, `"time"`, or `"TIME"`);
### GSLIB
* Other options are passed to `GslibIO.load`, see the GslibIO.jl documentation for more details;
### Shapefile
* Other options are passed to `Shapefile.read`, see the Shapefile.jl documentation for more details;
### GeoJSON
* Other options are passed to `GeoJSON.read`, see the GeoJSON.jl documentation for more details;
### GeoParquet
* Other options are passed to `GeoParquet.read`, see the GeoParquet.jl documentation for more details;
### GeoTIFF, GeoPackage, KML
* Other options are passed to `ArchGDAL.read`, see the ArchGDAL.jl documentation for more details;
## Examples
```julia
Expand Down
57 changes: 57 additions & 0 deletions src/save.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,63 @@ Other `kwargs` are forwarded to the backend packages.
Please use the [`formats`](@ref) function to list
all supported file formats.
## Options
### OFF
* `color`: name of the column with geometry colors, if `nothing`
the geometries will be saved without colors (default to `nothing`);
### MSH
* `vcolumn`: name of the column in vertex table with node data, if `nothing`
the geometries will be saved without node data (default to `nothing`);
* `ecolumn`: name of the column in element table with element data, if `nothing`
the geometries will be saved without element data (default to `nothing`);
### STL
* `ascii`: defines whether the file will be saved in ASCII format,
otherwise Binary format will be used (default to `false`);
### CSV
* `coords`: names of the columns where the point coordinates will be saved (default to `"x"`, `"y"`, `"z"`);
* `floatformat`: C-style format string for float values (default to no formatting);
* Other options are passed to `CSV.write`, see the CSV.jl documentation for more details;
### NetCDF
* `x`: name of the column where the coordinate x will be saved (default to `"x"`);
* `y`: name of the column where the coordinate y will be saved (default to `"y"`);
* `z`: name of the column where the coordinate z will be saved (default to `"z"`);
* `t`: name of the column where the time measurements will be saved (default to `"t"`);
### GeoTIFF
* `options`: list with options that will be passed to GDAL;
### GeoPackage
* `layername`: name of the layer where the data will be saved (default to `"data"`);
* `options`: dictionary with options that will be passed to GDAL;
### GSLIB
* Other options are passed to `GslibIO.save`, see the GslibIO.jl documentation for more details;
### Shapefile
* Other options are passed to `Shapefile.write`, see the Shapefile.jl documentation for more details;
### GeoJSON
* Other options are passed to `GeoJSON.write`, see the GeoJSON.jl documentation for more details;
### GeoParquet
* Other options are passed to `GeoParquet.write`, see the GeoParquet.jl documentation for more details;
## Examples
```julia
Expand Down

0 comments on commit 04ef065

Please sign in to comment.