Under review

Rotated Block Models, Pass Merging

Geoff Elson 9 years ago in Resource Estimation updated 9 years ago 6
Is there a scheduled fix to not being able to merge or append rotated block model files?

There is a work around but it is laborious, involving copying coordinates to provisional columns, deleting the rotated location columns, merging/appending and then re-imported and adding rotation.
This is where I am with trying to work around it in Python. I am running into the 3d coord wall and can't get around it.

InputFile1 = "BlockModel_Estimated_OK.DAT"
InputFile2 = "BlockModel_Estimated_IDW_Pass_2.DAT"

CurrentProject = MMpy.Project()
CurrentProjectPath = CurrentProject.path()
InputFile1 = CurrentProjectPath + InputFile1
InputFile2 = CurrentProjectPath + InputFile2

MyFile1 = MMpy.File() #Make a variable to point to the Interval file
MyFile1.open(InputFile1) #'Opens' file, makes it 'active'
record_count1 = MyFile1.records_count
print('The file being APPENDED contains', record_count1, 'records.')

MyFile2 = MMpy.File() #Make a variable to point to the Interval file
MyFile2.open(InputFile2) #'Opens' file, makes it 'active'
record_count2 = MyFile2.records_count
print('The file APPENDING contains', record_count2, 'records.')

Headings = ['X', 'Y', 'Z', '_X', '_Y', '_Z', 'Index', 'Au', 'AG', 'PB', 'ZN', 'CU', 'AS', 'FE', 'Thick_True', 'Pass', 'POINTS', 'CLOSEST DISTANCE']

for record in range(1, record_count2+1):
for Heading in Headings:
FieldName = Heading
Field_Id = MyFile1.get_field_id(FieldName)
Heading = Field_Id
Value = MyFile2.get_num_field_value(Heading,record)

record_count1 = MyFile1.records_count
print('The file APPENDED now contains', record_count1, 'records.')

Under review

I don't really have a solution for now, but I am just curious :
  • Do your Rotated Block Model have the same rotation ?
  • If not, how do you think the rotation merge should be handle ?
Yan, The two files I am appending are estimation iterations of the same parent block model so they have the same rotation. I typically estimate a small radius pass then a large radius pass only for blocks not estimated in the first pass.
Block by block rotation would be cool but data intensive because you would need an instruction at each record for x, y, and z. I would use it, but there is probably not practicality for many other users.
I think the merge forms should act the same way rotated or not, is there any reason rotated files need to have special columns? I assume this has something to do with the rotation metadata. If the rotated file structure has to stay, I think the forms have to be updated to work the same way rotated or not, there are many forms that don't run because of rotation.

Work Around
My current work around for merging is to keep the files as rotated for sub-blocking and spatial volume in/out calculations prior to estimation, then for estimation(because I am not discretizing) I export to a .csv, delete the .dat and re-import as the same name not rotated, estimate the passes, merge the passes and then add rotation as the last step. 

The blue is pass one, the red is pass two. Looking in the plane of the vein:

Final merged model:
Hi Geoff,

Are you using Modelling | Block Model Tools | Combine to add the 2 rotated models together? This tool supports rotated BMs but they obviously need the same rotation definition.

Rotated models can't just be combined just by merging or appending the "raw" DAT files together because the rotation of the coordinates needs to be handled specially by the Combine algorithm.
Hi Geoff,
This doesn't answer your question but may be an alternative work around. I hope I'm not totally missing the point.
To my knowledge the OK or IDW outputs don't actually overwrite data (at least for a single element). You can therefore feed the block model output from Pass 1 as the block model input file for pass two. Whatever was populated in Pass 1 should be left untouched. You can tag which pass populated the block using the Add Fields option. This should avoid the need for block model merging.
Hope that helps.
Scott, Rupert,
Thanks, I was unaware of both of your suggestions. Each will solve my problem, I will try them both.