@@ -1360,7 +1360,7 @@ def virtualfile_from_grid(self, grid):
1360
1360
with self .open_virtual_file (* args ) as vfile :
1361
1361
yield vfile
1362
1362
1363
- def virtualfile_from_data (self , data , x = None , y = None , z = None , check_kind = None ):
1363
+ def virtualfile_from_data (self , check_kind = None , data = None , x = None , y = None , z = None ):
1364
1364
"""
1365
1365
Store any data inside a virtual file.
1366
1366
@@ -1370,22 +1370,22 @@ def virtualfile_from_data(self, data, x=None, y=None, z=None, check_kind=None):
1370
1370
1371
1371
Parameters
1372
1372
----------
1373
- data : str, xarray.DataArray, 2d array, or None
1374
- The vectors that will be included in the array. All must be of the
1375
- same size.
1376
- x/y/z : 1d arrays or None
1377
- x, y and z columns as numpy arrays.
1378
1373
check_kind : str
1379
1374
Used to validate the type of data that can be passed in. Choose
1380
1375
from 'raster', 'vector' or None. Default is None (no validation).
1376
+ data : str, xarray.DataArray, 2d array, or None
1377
+ Any raster or vector data format. This could be a file name, a
1378
+ raster grid, a vector matrix/arrays, or other supported data input.
1379
+ x/y/z : 1d arrays or None
1380
+ x, y and z columns as numpy arrays.
1381
1381
1382
1382
Returns
1383
1383
-------
1384
1384
file_context : contextlib._GeneratorContextManager
1385
1385
The virtual file stored inside a context manager. Access the file
1386
- name of this virtualfile using `with file_context as fname: ...`.
1386
+ name of this virtualfile using `` with file_context as fname: ...` `.
1387
1387
"""
1388
- kind = data_kind (data , x , y , z , check_kind )
1388
+ kind = data_kind (check_kind , data , x , y , z )
1389
1389
1390
1390
# Decide which virtualfile_from_ function to use
1391
1391
_virtualfile_from = {
0 commit comments