GridSource
fio.GridSource(
    file,
    mode='r',
    srs=None,
    chunk=None,
    subset=None,
    var_as_band=False,
)A source object for geospatial gridded data.
Essentially a gdal Dataset wrapper.
Parameters
| Name | Type | Description | Default | 
|---|---|---|---|
| file | str | The path to a file. | required | 
| mode | str | The I/O mode. Either r for reading or w for writing. | 
'r' | 
| srs | str | A Spatial reference system string in case the dataset has none. | None | 
| chunk | tuple | Chunking size of the data. | None | 
| subset | str | The wanted subset of data. This is applicable to netCDF files containing multiple variables. | None | 
| var_as_band | bool | Whether to interpret the variables as bands. This is applicable to netCDF files containing multiple variables. | False | 
Examples
Can be indexed directly to get a Grid object.
# Open a file
gs = open_grid(< path-to-file >)
# Index it (take the first band)
grid = gs[1]Attributes
| Name | Description | 
|---|---|
| bounds | Return the bounds of the GridSource. | 
| chunk | Return the chunking size. | 
| dtype | Return the data types of the field data. | 
| geotransform | Return the geo transform of the grid. | 
| shape | Return the shape of the grid. | 
| shape_xy | Return the shape of the grid. | 
| size | Return the number of bands. | 
| srs | Return the srs (Spatial Reference System). | 
Methods
| Name | Description | 
|---|---|
| close | Close the GridSource. | 
| create | Create a new data source. | 
| create_band | Create a new band. | 
| deter_band_names | Determine the names of the bands. | 
| flush | Flush the data. | 
| get_band_name | Get the name of a specific band. | 
| get_band_names | Get the names of all bands. | 
| reopen | Reopen a closed GridSource. | 
| set_chunk_size | Set the chunking size of the grid. | 
| set_geotransform | Set the geo transform of the grid. | 
| set_srs | Set the srs of the gird. |