gempy icon indicating copy to clipboard operation
gempy copied to clipboard

Faulty behaviour with Polygon Dictionaries in sectionutils

Open aaronfoe opened this issue 5 years ago • 0 comments

Hi, I am currently using GemPy as part of my masters' thesis at the RWTH GGE/CGRE chairs. I need to extract the surfaces of 2D cross-sections to pass them on to a meshing library for further calculations. I create cross sections in GemPy and access the surface nodes with pg.sectionutils.get_polygon_dictionary . The resulting dictionaries, however, never include the fault surfaces. The respective entries are not empty, but contain the coordinates for one of the stratigraphic layers.

I use the code below to plot the 'Main_Fault' surface from the chapter 1-1 of the tutorial notebooks:

coords, colors, extent = gp.utils.section_utils.get_polygon_dictionary(model,section)
form = 'Main_Fault'
pointslist = np.array(coords[form])
if pointslist.shape != ():
    for points in pointslist:
        plt.plot(points[:,0], points[:,1])

The section plotted with gempy: gempysection

The 'Main_Fault' dict entry plotted:

gempyfaultweird

It appears to plot the 'basement' polygon instead. The polygon returned for the 'basement' entry seems to return the layer above the basement:

gempybasementweird

This pattern continues for all layers. The dict entry for the uppermost layer is empty.

OS: MacOS 10.13.4 Gempy v. 2.1.1

Any help/tips are greatly appreciated. Aaron

aaronfoe avatar May 11 '20 15:05 aaronfoe