Skip to content

Unexpected third layer in GemPy model despite mapping only two formations #1069

Description

@ajndekker

**What is your question?**I'm working with GemPy 3 to build a simple geological model with two formations: Limestone and basement. My input data is minimal — just one orientation point per formation, and several surface points for each.

However, when I use ImporterHelper, GemPy creates three layers instead of two. Specifically, I end up with two separate "basement" layers, each with a different color. This seems to happen automatically during model creation.

🔧 Code

import gempy as gp
import gempy_viewer as gpv
import pandas as pd

# Load data
surface_df = pd.read_csv('/content/surface_points.csv')
orientation_df = pd.read_csv('/content/orientations.csv')

# Create model using ImporterHelper
geo_model = gp.create_geomodel(
    project_name='GeoModel_NL_Biesbosch',
    extent=[0, 780, -200, 200, -582, 0],
    resolution=(50, 50, 50),
    importer_helper=gp.data.ImporterHelper(
        path_to_surface_points='/content/surface_points.csv',
        path_to_orientations='/content/orientations.csv'
    )
)

# Map surfaces to series
gp.map_stack_to_surfaces(
    gempy_model=geo_model,
    mapping_object={
        "Strat_Series": ("Limestone", "basement")
    }
)

# Compute model
gp.compute_model(geo_model)

# Inspect layers
for el in geo_model.structural_frame.structural_elements:
    print(f" - {el.name}, color: {el.color}")

X,Y,Z,G_x,G_y,G_z,formation
225,0,-95,0,0,1,Limestone
225,0,-200,0,0,1,basement

Problem
I expect two layers: Limestone and basement

Instead, I get three layers, with two separate entries for basement (different colors)

This only happens when using ImporterHelper. If I manually build a StructuralFrame, I get two layersbut the plot remains empty unless I manually add data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions