You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will you kindly inform me if the following code which I derived from your excellent website works on your computer?
import geopandas as gpd
import numpy as np
import rasterio
import pyflwdir
from utils import vectorize
# define output locations
x, y = np.array([4.67916667, 7.60416667]), np.array([51.72083333, 50.3625])
gdf_out = gpd.GeoSeries(gpd.points_from_xy(x, y, crs=4326))
# delineate subbasins
subbasins = flw.basins(xy=(x, y), streams=flw.stream_order() >= 4)
# vectorize subbasins using the vectorize convenience method from utils.py
gdf_bas = vectorize(subbasins.astype(np.int32), 0, flw.transform, name="basin")
gdf_bas.head()
Many thanks for any help you may provide,
Joseph
Current behaviour
ImportError: cannot import name 'vectorize' from 'utils' (c:\Users\PollaccoJ.julia\conda\3\x86_64\envs\hydromt-wflow\Lib\site-packages\utils_init.py)_
Desired behaviour
Free from error
Additional context
Please appologize for such a basic question, as I am somewhat new to spatial modelling. I am in the Southern hemisphere so there might be some extra complications.
My other questions is the coordinate system used to define the output location is the same as when for e.g. the coordinate (y,x) system as shown in QGIS . it did not seem to work. Or do we need to perform transformation to the gridded coordinate system used by PyFlwDir?
Many thanks for any help you may provide,
Joseph
The text was updated successfully, but these errors were encountered:
pyFlwDir version checks
Reproducible Example
A great thanks for deriving such an amazing tool to help to derive the data to feed into the WFLOW Julia model.
The PyFlwDir seem to be working well except fror:
from utils import vectorize
were vectorize is not being recognised.
And therefore I am not able to perform the simple task as in your example:
gdf_bas = vectorize(subbasins.astype(np.int32), 0, flw.transform, name="basin")
Will you kindly inform me if the following code which I derived from your excellent website works on your computer?
Many thanks for any help you may provide,
Joseph
Current behaviour
ImportError: cannot import name 'vectorize' from 'utils' (c:\Users\PollaccoJ.julia\conda\3\x86_64\envs\hydromt-wflow\Lib\site-packages\utils_init.py)_
Desired behaviour
Free from error
Additional context
Please appologize for such a basic question, as I am somewhat new to spatial modelling. I am in the Southern hemisphere so there might be some extra complications.
My other questions is the coordinate system used to define the output location is the same as when for e.g. the coordinate (y,x) system as shown in QGIS . it did not seem to work. Or do we need to perform transformation to the gridded coordinate system used by PyFlwDir?
Many thanks for any help you may provide,
Joseph
The text was updated successfully, but these errors were encountered: