Deltares / Deltares/imod-python
Add selection function to assign points to an existing geodataframe
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 21h 8m
- Merged PRs (30d)
- 1
Description
In GitLab by @Huite on Oct 7, 2022, 11:51
This is currently a little cumbersome:
selection = imod.select.points_values(da, x=gdf.geometry.x, y=gdf.geometry.y)
df = selection.to_dataframe()
gdf["values"] = df["values"]
Would be nicer to do:
new_gdf = imod.select.points_values_geodataframe(da, gdf)
And since we read IPFs as dataframes:
new_df = imod.select.points_values_dataframe(da, df, x="x-coord", y="y-coord")
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from imod.select.points_values and the GeoDataFrame and DataFrame usage shown in the issue. Trace how point selections are returned, then verify that the requested GeoDataFrame and DataFrame entry points produce objects with the sampled values attached to the supplied data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100