uxarray.Grid.from_file

Contents

uxarray.Grid.from_file#

classmethod Grid.from_file(filename, backend='geopandas', **kwargs)#

Constructs a Grid object from a using the read_file method with a specified backend.

Parameters:
  • filename (str) – Path to grid file

  • backend (str, default='geopandas') – Backend to use to read the file, xarray or geopandas.

Examples

>>> import uxarray as ux
>>> grid = ux.Grid.from_file("path/to/file.shp", backend="geopandas")

Note

All formats supported by geopandas.read_file can be used. See more at: https://geopandas.org/en/stable/docs/reference/api/geopandas.read_file.html#geopandas-read-file