hydromt.io.open_vector_from_table#
- hydromt.io.open_vector_from_table(fn, driver=None, x_dim=None, y_dim=None, crs=None, **kwargs)[source]#
Read point geometry files from csv, parquet, xy or excel table files.
- Parameters:
driver (
{'csv', 'parquet', 'xls', 'xlsx', 'xy'}
) – If ‘csv’ usepandas.read_csv()
to read the data; If ‘parquet’ usepandas.read_parquet()
to read the data; If ‘xls’ or ‘xlsx’ usepandas.read_excel()
with engine=openpyxl If ‘xy’ usepandas.read_csv()
with index_col=False, header=None, delim_whitespace=True.x_dim (
str
) – Name of x, y column. By default the x-column header should be one of [‘x’, ‘longitude’, ‘lon’, ‘long’], and y-column header one of [‘y’, ‘latitude’, ‘lat’]. For xy files, which don’t have a header, the first column is interpreted as x and the second as y column.y_dim (
str
) – Name of x, y column. By default the x-column header should be one of [‘x’, ‘longitude’, ‘lon’, ‘long’], and y-column header one of [‘y’, ‘latitude’, ‘lat’]. For xy files, which don’t have a header, the first column is interpreted as x and the second as y column.crs (
int
,dict
, orstr
, optional) – Coordinate reference system, accepts EPSG codes (int or str), proj (str or dict) or wkt (str)fn – The filename to read the table from.
**kwargs – Additional keyword arguments that are passed to the underlying drivers.
- Returns:
gdf – Parsed and filtered point geometries
- Return type: