Issue with Chinese Characters in CSV File Not Displaying in 3D Visualization in GemPy #980
Replies: 2 comments
-
this is csv file. |
Beta Was this translation helpful? Give feedback.
-
Hi @fivetaibin, can you verify, that this problem does not exist in 2d plots? Can you also show me, what the structural frame ( My suggestion how to solve this, is to
If you are able to solve your problem using this or another method, it would be great, if you could share your solution here. I think there are other Chinese users, that would appreciate that a lot. |
Beta Was this translation helpful? Give feedback.
-
Hello GemPy team,
I am encountering an issue when using Chinese characters in the formation field of my CSV file. When I set the value of formation to Chinese characters, the 3D model generated by GemPy does not display the corresponding structural elements correctly (i.e., the value of geo_model.structural_frame.structural_elements[0].name). It seems that GemPy only supports English characters for this field.
Could you please help me understand why this is happening? Is there a way to resolve this issue so that Chinese characters can be displayed properly in the 3D visualization?
For your reference, here are the details:
import pandas as pd
import gempy as gp
import gempy_viewer as gpv
import time
start_time = time.time()
print(gp.file)
print(gp.file)
data_path_points = 'D:/gitLab/underground/static/inputfiles/getstarted1/simple_fault_model_points.csv'
data_path_orientations = 'D:/gitLab/underground/static/inputfiles/getstarted1/simple_fault_model_orientations.csv'
data = pd.read_csv(data_path_points)
x = data['X']
y = data['Y']
z = data['Z']
xmin, ymin, zmin = x.min(), y.min(), z.min()
xmax, ymax, zmax = x.max(), y.max(), z.max()
geo_model: gp.data.GeoModel = gp.create_geomodel(
project_name='标题',
extent=[xmin, xmax, ymin, ymax, zmin, zmax],
refinement=6,
importer_helper=gp.data.ImporterHelper(
path_to_orientations=data_path_orientations,
path_to_surface_points=data_path_points,
)
)
print(geo_model.structural_frame.structural_elements[0].name)
sol = gp.compute_model(geo_model)
gpv.plot_3d(
model=geo_model,
plotter_type='basic',
show_data=False,
image=False
)
end_time = time.time()
execution_time = end_time - start_time
print(f"Total execution time: {execution_time:.4f} seconds")
Beta Was this translation helpful? Give feedback.
All reactions