Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid duplicate polyline names in geodataframe_to_PolyFile #492

Closed
veenstrajelmer opened this issue Jul 31, 2023 · 0 comments · Fixed by #896
Closed

Avoid duplicate polyline names in geodataframe_to_PolyFile #492

veenstrajelmer opened this issue Jul 31, 2023 · 0 comments · Fixed by #896

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Jul 31, 2023

It seems that currently all names of the separate polyfiles are the same, the below code is a user-scoped workaround used in the DSO project:

bnd_gdf = dfmt.generate_bndpli_cutland(mk=mk_object, res='h', buffer=0.01)  
bnd_gdf['name'] = f'{model_name}_bnd' # this must be changed to allow for multiple polylines in the file
bnd_gdf['nr_bnd'] = bnd_gdf.index
bnd_gdf['name'] = bnd_gdf['name'] + '_' + bnd_gdf['nr_bnd'].astype(str)  
bnd_gdf_interp = dfmt.interpolate_bndpli(bnd_gdf, res=0.06)

Properly implement this in dfmt.geodataframe_to_PolyFile() instead of bothering the user with it.

@veenstrajelmer veenstrajelmer changed the title Escapes for polyfiles with multiple polylines Avoid duplicate polyline names in geodataframe_to_PolyFile Jul 9, 2024
@veenstrajelmer veenstrajelmer linked a pull request Jul 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant