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, xy or excel table files.
- Parameters:
driver ({'csv', 'xls', 'xlsx', 'xy'}) – If ‘csv’ use
pandas.read_csv()
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, or str, optional) – Coordinate reference system, accepts EPSG codes (int or str), proj (str or dict) or wkt (str)
- Returns:
gdf – Parsed and filtered point geometries
- Return type: