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

[DOC] Add Notebook to illustrate exporting shapefiles from GemPy geological maps and section lines #240

Closed
KetMic opened this issue Jan 30, 2023 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@KetMic
Copy link

KetMic commented Jan 30, 2023

Is your feature request related to a problem? Please describe.
Add notebook to illustrate exporting GemPy section lines and geological maps to shapefiles.

Describe the solution you'd like
Upload a notebook showing how to export

  1. GemPy section lines as shapefile:

from shapely.geometry import LineString
gdf_sections = geo_model.grid.sections.df.copy(deep=True)
gdf_sections.reset_index()
linestrings = [LineString((gdf_sections.iloc[i]['start'],gdf_sections.iloc[i]['stop'] )) for i in range(len(gdf_sections))]
gdf_sections_new = gpd.GeoDataFrame(geometry=linestrings, data= gdf_sections.reset_index()[['index']], crs='EPSG:32632')
gdf_sections_new.to_file(file_path + 'test_sections.shp')

  1. GemPy geological map polygons as shapefile:

gdf = gg.postprocessing.extract_lithologies(geo_model, geo_model.grid.regular_grid.extent[:4], crs='EPSG:32632')
gdf.to_file(file_path + 'test.shp')

@github-actions
Copy link

Hello and welcome! Thanks for posting your first issue in the GemGIS project! Someone from our developers will get back to you. If your question is support related, we may transfer it to the Discussions.

@AlexanderJuestel AlexanderJuestel self-assigned this Jan 30, 2023
@AlexanderJuestel AlexanderJuestel added documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers labels Jan 30, 2023
@AlexanderJuestel AlexanderJuestel added this to the GemGIS 1.1 milestone Jan 30, 2023
@AlexanderJuestel AlexanderJuestel changed the title Add notebook to illustrate exporting shapefiles from GemPy geological maps and section lines Add Notebook to illustrate exporting shapefiles from GemPy geological maps and section lines Feb 1, 2023
@github-actions
Copy link

github-actions bot commented Mar 4, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Mar 4, 2023
@AlexanderJuestel AlexanderJuestel changed the title Add Notebook to illustrate exporting shapefiles from GemPy geological maps and section lines [DOC] Add Notebook to illustrate exporting shapefiles from GemPy geological maps and section lines Mar 4, 2023
AlexanderJuestel added a commit that referenced this issue Mar 13, 2023
Added Tutorial Notebooks to Issues [#238][#240]
@github-actions
Copy link

github-actions bot commented Apr 4, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

github-actions bot commented May 5, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants