Importing contours AutoCAD file

Hello all,

I have received huge data in contours format (1m interval & each CAD file 200MB to 400 MB total 12nos) from client and the total area covers around 12313.9 hectares. They don't have other format and it is totally hilly terrain.
Each time I upload CAD file model file size increase around 400MB to 700MB. I was compressed model file after each CAD file upload. After uploading 5 files Mx was not responding and Model file crashed. I have tried several times.
Can you please suggest me any other way without losing data?

MX XM version

Regards,

Sri

Parents
  • Sri,

    You can use an optimising tolerance in MX to reduce the amount of points on strings.

    Once you have imported each file, use the File > Export > GENIO > Models to File option, and select the model that has just been imported. Then open the file you have just created in a text editor.

    You will see a line starting with "080" - one for each contour string. You can edit these lines to introduce an optimising tolerance. You need to set field 3 to HORZ, and field 10 to the tolerance you need.

    So for example this: 

    080,0001,4= 125.000, 0.0, 0.0, 7702 

    Becomes this:

    080,0001,3=HORZ,4= 125.000, 0.0, 0.0, 7702,10=0.5

    You will need to adjust every 080 record, which you can do using Find and Replace functionality in most text editors. The value in field 10 is key to this technique, and a little trial and error will be needed here to find the best tolerance to use.

    I would report the number of points in the original model, edit the text file for every 080 record, then use the File > Import > ASCII File option to read the GENIO file back in. Finally, report the number of points in the new model. Obviously there is a tradeoff here between the reduction in the number of points and the accuracy of the edited data. You could also change the model name in the text file to note the tolerance you used, so this:

    DELETE CONTOURS
    CREATE CONTOURS

    Becomes this:

    DELETE CONTOURS USING POINT 5
    CREATE CONTOURS USING POINT 5

    You will need to remove the three spaces at the start of these two lines for MX to read them (three spaces means that they are commented out). MX model names are alphanumeric only.

    For more information on the optimising tolerance, look at the help topic "Linemode Reference: GENIO: 080 General input of strings".

    Regards,

    Jon

Reply Children
  • Sri

    Jonathan's Smith's recommendation is good, but may not solve the problem of sheer volume. If not, read on ...

    If as you say the client really does not have and cannot obtain the base survey model from which the contours were generated then the client must accept the risk (which may be very slight to significant, depending on how the contours were generated) of significant errors: contours are of course of a tertiary order of accuracy. That established, lets move on to how to deal with this.

    Firstly, I would ask what form the data has been supplied in: you mention CAD file upload, so my guess is that you have DWGs or DXFs and are loading through the MX File > Import > ASCII data menu, which converts a DXF to a Genio file. (I would certainly not recommend importing such a huge amount of data via interactive MX -> CAD conversion tools).

    What I would suggest is that you run the process with the automatic running of the genio data turned off: this means the initial output is just the genio data. Assuming that it is just contours in the dwg and nothing else, you should convert to the dummy model names BLOCKED and UNBLOCKED. Make a back-up copy of the genio file. Open the file (you will need a good text editor), and look to see if there is any instance of the modelname 'Blocked'. If so delete every chunk of data from (and including) that genio line to the next 999. Clear them all out. But there may not be any.

    Next look for and count up the genio lines with the 'Unblocked' model name. Is there more than one? If so, this gives an opportunity to divide the file up into several smaller file - potentially one for each Genio session. However it may well be that there is now only one genio major option line, up at the top. Let's assume so, as this is the worst case and we can look at how to deal with that.

    Each of the new files should start like this

    GENIO,UNBLOCKED
    017,NORM
    001FORMAT(2D23.17)
    003,ORDR,4=1,1,2,

    Then will follow string/point data, each of which commences will start and end something like this (the number of intervening datalines will depend on the number of points in that particular string - each line is a single point)

    080,0002,4= 36.500, 0.0, 0.0, 7702
    ...
    0.00000000000000000D+000.00000000000000000D+00

    You can now transfer/copy from the 'complete' genio data into the series of smaller files you have prepared long chunks of string data, so that the files have an broadly similar size (your text editor will show line numbers, and you can use this to plan this work). Each individual file should end as follows:

    999
    finish

    Now if you consider each of these X number files as children, it needs a parent (you can decide for yourself whether it is mum or dad!) This is the input file you will actually run. Give all the children the file extension .CRD Give the parent file the extension .INP This will help clarify the structure, and indeed the filenames themselves could emphasise this. Content of the parent file is as follows:

    MX
    output
    subsys
    sysdel,dbug.prn
    999
    output,dbug
     
    delete,unblocked
    create,unblocked
    input,[child filename 1]
    input,[child filename 2]
    input,[child filename 3]
    ... as required
    delete,[name for your contour model]
    rename,unblocked,[name for your contour model]
    compress,modelfile
    output
    subsys
    sysdel,dbug.prn
    999

    You could insert here input code to do any necessary editing, eg reducing model to area of interest, correcting errors etc.
    finish

    Make sure there are no other major option lines mentioned than those I've specified above.

    Okay, that's done! Now you can get on with the job itself. 'twas ever thus!

    Jonathan Bridge