diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a42524880..5519ecec0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -50,3 +50,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: gh-pages + diff --git a/docs/docs-requirements.txt b/docs/docs-requirements.txt index a448f7f7d..969601087 100644 --- a/docs/docs-requirements.txt +++ b/docs/docs-requirements.txt @@ -1,10 +1,9 @@ setuptools==68.1.2 -Sphinx==4.4.0 -sphinx-material==0.0.35 -nbsphinx==0.8.8 +Sphinx==6.1.3 +sphinx-material==0.0.36 +nbsphinx>=0.8.8 ipython>=8.10.1 sphinxcontrib-fulltoc==1.2.0 livereload==2.6.3 -autodocsumm==0.2.7 -sphinx-tabs==3.2.0 -renku-sphinx-theme==0.2.3 \ No newline at end of file +sphinx-tabs==3.4.4 +renku-sphinx-theme==0.3.0 \ No newline at end of file diff --git a/docs/source/api/raster-format-readers.rst b/docs/source/api/raster-format-readers.rst index dabcc821e..3e0c6443e 100644 --- a/docs/source/api/raster-format-readers.rst +++ b/docs/source/api/raster-format-readers.rst @@ -4,8 +4,9 @@ Raster Format Readers Intro -################ +##### Mosaic provides spark readers for the following raster formats: + * GTiff (GeoTiff) using .tif file extension - https://gdal.org/drivers/raster/gtiff.html * COG (Cloud Optimized GeoTiff) using .tif file extension - https://gdal.org/drivers/raster/cog.html * HDF4 using .hdf file extension - https://gdal.org/drivers/raster/hdf4.html @@ -20,6 +21,7 @@ Mosaic provides spark readers for the following raster formats: * XPM using .xpm file extension - https://gdal.org/drivers/raster/xpm.html * GRIB using .grb file extension - https://gdal.org/drivers/raster/grib.html * Zarr using .zarr file extension - https://gdal.org/drivers/raster/zarr.html + Other formats are supported if supported by GDAL available drivers. Mosaic provides two flavors of the readers: @@ -32,6 +34,7 @@ spark.read.format("gdal") A base Spark SQL data source for reading GDAL raster data sources. It reads metadata of the raster and exposes the direct paths for the raster files. The output of the reader is a DataFrame with the following columns: + * tile - loaded raster tile (RasterTileType) * ySize - height of the raster in pixels (IntegerType) * xSize - width of the raster in pixels (IntegerType) @@ -94,6 +97,7 @@ If the raster pixels are larger than the grid cells, the cell values can be calc The interpolation method used is Inverse Distance Weighting (IDW) where the distance function is a k_ring distance of the grid. The reader supports the following options: + * fileExtension - file extension of the raster file (StringType) - default is *.* * vsizip - if the rasters are zipped files, set this to true (BooleanType) * resolution - resolution of the output grid (IntegerType) diff --git a/docs/source/api/vector-format-readers.rst b/docs/source/api/vector-format-readers.rst index 8825803d5..8d9b420e2 100644 --- a/docs/source/api/vector-format-readers.rst +++ b/docs/source/api/vector-format-readers.rst @@ -8,36 +8,26 @@ Intro Mosaic provides spark readers for vector files supported by GDAL OGR drivers. Only the drivers that are built by default are supported. Here are some common useful file formats: - * GeoJSON (also ESRIJSON, TopoJSON) - https://gdal.org/drivers/vector/geojson.html - * ESRI File Geodatabase (FileGDB) and ESRI File Geodatabase vector (OpenFileGDB) - Mosaic implements named reader geo_db (described in this doc) - https://gdal.org/drivers/vector/filegdb.html - * ESRI Shapefile / DBF (ESRI Shapefile) - Mosaic implements named reader shapefile (described in this doc) - https://gdal.org/drivers/vector/shapefile.html - * Network Common Data Form (netCDF) - Mosaic implements raster reader also - https://gdal.org/drivers/raster/netcdf.html - * (Geo)Parquet (Parquet) - Mosaic will be implementing a custom reader soon - https://gdal.org/drivers/vector/parquet.html - * Spreadsheets (XLSX, XLS, ODS) - https://gdal.org/drivers/vector/xls.html - * U.S. Census TIGER/Line (TIGER) - https://gdal.org/drivers/vector/tiger.html - * PostgreSQL Dump (PGDump) - https://gdal.org/drivers/vector/pgdump.html - * Keyhole Markup Language (KML) - https://gdal.org/drivers/vector/kml.html - * Geography Markup Language (GML) - https://gdal.org/drivers/vector/gml.html - * GRASS - option for Linear Referencing Systems (LRS) - https://gdal.org/drivers/vector/grass.html + + * GeoJSON (also ESRIJSON, TopoJSON) https://gdal.org/drivers/vector/geojson.html + * ESRI File Geodatabase (FileGDB) and ESRI File Geodatabase vector (OpenFileGDB). Mosaic implements named reader geo_db (described in this doc). https://gdal.org/drivers/vector/filegdb.html + * ESRI Shapefile / DBF (ESRI Shapefile) - Mosaic implements named reader shapefile (described in this doc) https://gdal.org/drivers/vector/shapefile.html + * Network Common Data Form (netCDF) - Mosaic implements raster reader also https://gdal.org/drivers/raster/netcdf.html + * (Geo)Parquet (Parquet) - Mosaic will be implementing a custom reader soon https://gdal.org/drivers/vector/parquet.html + * Spreadsheets (XLSX, XLS, ODS) https://gdal.org/drivers/vector/xls.html + * U.S. Census TIGER/Line (TIGER) https://gdal.org/drivers/vector/tiger.html + * PostgreSQL Dump (PGDump) https://gdal.org/drivers/vector/pgdump.html + * Keyhole Markup Language (KML) https://gdal.org/drivers/vector/kml.html + * Geography Markup Language (GML) https://gdal.org/drivers/vector/gml.html + * GRASS - option for Linear Referencing Systems (LRS) https://gdal.org/drivers/vector/grass.html + For more information please refer to gdal documentation: https://gdal.org/drivers/vector/index.html Mosaic provides two flavors of the readers: - * spark.read.format("ogr") for reading 1 file per spark task - * mos.read().format("multi_read_ogr") for reading file in parallel with multiple spark tasks +* spark.read.format("ogr") for reading 1 file per spark task +* mos.read().format("multi_read_ogr") for reading file in parallel with multiple spark tasks spark.read.format("ogr") @@ -46,12 +36,13 @@ A base Spark SQL data source for reading GDAL vector data sources. The output of the reader is a DataFrame with inferred schema. The schema is inferred from both features and fields in the vector file. Each feature will be provided as 2 columns: - * geometry - geometry of the feature (GeometryType) - * srid - spatial reference system identifier of the feature (StringType) +* geometry - geometry of the feature (GeometryType) +* srid - spatial reference system identifier of the feature (StringType) The fields of the feature will be provided as columns in the DataFrame. The types of the fields are coerced to most concrete type that can hold all the values. The reader supports the following options: + * driverName - GDAL driver name (StringType) * vsizip - if the vector files are zipped files, set this to true (BooleanType) * asWKB - if the geometry should be returned as WKB (BooleanType) - default is false @@ -109,12 +100,13 @@ Chunk size is the number of file rows that will be read per single task. The output of the reader is a DataFrame with inferred schema. The schema is inferred from both features and fields in the vector file. Each feature will be provided as 2 columns: - * geometry - geometry of the feature (GeometryType) - * srid - spatial reference system identifier of the feature (StringType) +* geometry - geometry of the feature (GeometryType) +* srid - spatial reference system identifier of the feature (StringType) The fields of the feature will be provided as columns in the DataFrame. The types of the fields are coerced to most concrete type that can hold all the values. The reader supports the following options: + * driverName - GDAL driver name (StringType) * vsizip - if the vector files are zipped files, set this to true (BooleanType) * asWKB - if the geometry should be returned as WKB (BooleanType) - default is false @@ -171,6 +163,7 @@ Mosaic provides a reader for GeoDB files natively in Spark. The output of the reader is a DataFrame with inferred schema. Only 1 file per task is read. For parallel reading of large files use the multi_read_ogr reader. The reader supports the following options: + * asWKB - if the geometry should be returned as WKB (BooleanType) - default is false * layerName - name of the layer to read (StringType) * layerNumber - number of the layer to read (IntegerType) @@ -223,6 +216,7 @@ Mosaic provides a reader for Shapefiles natively in Spark. The output of the reader is a DataFrame with inferred schema. Only 1 file per task is read. For parallel reading of large files use the multi_read_ogr reader. The reader supports the following options: + * asWKB - if the geometry should be returned as WKB (BooleanType) - default is false * layerName - name of the layer to read (StringType) * layerNumber - number of the layer to read (IntegerType)