RLo
RLo

Reputation: 11

Following PyGSLIB demo - with my own data

I have followed the PyGSLIB tutorial (https://opengeostat.github.io/pygslib/Tutorial.html) and am now ready to try running the code on my own data. I have successfully imported the drillhole tables, created the drillhole objects... all the way to tagging my samples with the domain code.

I encounter a problem when I get to the code

>># creating a partial model by filtering out blocks with zero proportion inside the solid
>>mymodel.set_blocks(mymodel.bmtable[mymodel.bmtable['D1']> 0])

>># export partial model to a vtk unstructured grid (*.vtu)
>>mymodel.blocks2vtkUnstructuredGrid(path='model.vtu')

Where the kernel dies, specifically when trying to export the model to a VTU file format. To explore some more I tried declustering the parameters, but when I entered the code:

>>wtopt,vrop,wtmin,wtmax,error, \
xinc,yinc,zinc,rxcs,rycs,rzcs,rvrcr = pygslib.gslib.declus(parameters_declus)

The kernel did not complete the task, and I was not able to plot the deculstered optimization results.

--------------------------------------------------------------------------- NameError Traceback (most recent call last) Input In [27], in 1 #Plotting declustering optimization results ----> 2 plt.plot (rxcs, rvrcr, '-o') 3 plt.xlabel('X cell size') 4 plt.ylabel('declustered mean')

NameError: name 'rxcs' is not defined

ERROR! Session/line number was not unique in database. History logging moved to new session 118

As far as I can tell, this is because I have not set up an appropriate wireframe - the STL file I have does not seem to have the geospatial data listed in terms of meters (which I think the data from the tutorial is)... but I can't seem to find a way to convert the data from my STL file to a useable format.

My question is: How do I convert an STL file of a 3D portion of the earth's surface downloaded from 3D-mapper.com, into a useable wireframe to continue with the PyGSLIB code?

If anyone could shed some light on this issue, I would really appreciate it.

Upvotes: 1

Views: 148

Answers (0)

Related Questions