Corrupted DXF file

jlwolfejlwolfe Global Mapper UserPosts: 6
edited January 2009 in Vector Data
I have been exporting DXF files using the following technique. I load one or more DEM files and use them to generate contours for a selected area. This seems to work fine.

Then, I try to export the generated contours as a DXF file. I always do this by drawing a box around the selected area containing the contours on the screen. I want to import the DXF file into OCAD.

About half of the time this works and half the time it doesn't. I can't figure out what I am doing wrong the half of the time that it fails. I think I am doing the same steps each time.

When the export fails, I do not get an error. Instead, the exported file is significantly too large (10 to 30 MB) and contains only partial contours, at least that is what OCAD shows - many incomplete contours.

When the export succeeds, the DXF files are are about 1 to 3 MB and contain complete contours. GlobalMapper seems to be able to load either the good or the bad DXF files without a problem.

Any ideas on how I can get correct, small, complete DXF files all the time?

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited December 2008
    On the files that only show partial contours in OCAD, do complete contours show up in Global Mapper when you load that DXF file? If so, I'm guessing you are hitting some kind of length or size limit in OCAD and not seeing a problem related to the DXF file itself.

    When you generate your contours, what settings are you using for sample spacing and simplification? I'm guessing that when you are getting the larger files your contours lines are perhaps much more detailed for some reason resulting in much denser lines that take up more space and are perhaps too much for OCAD to handle.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • jlwolfejlwolfe Global Mapper User Posts: 6
    edited January 2009
    Regardless of whether the DXF file produced by Global Mapper is too large or not, it can correctly display the DXF file's contours.

    I agree that OCAD is probably having a problem with file size in not being able to handle the large DXF files. But the reason I am posting here is that I don't understand why Global Mapper produces two different sized DXF files for exactly the same or nearly the same areas when the specifications used are the same each time.

    The sample spacing that I am using is 3.2 feet in both the X and Y directions. The contours being generated are at 16.4 feet intervals. The areas that I have been generating contours for are from 0.5 to 2.0 sq miles. In each case, when the smaller DXF file is generated for an area, OCAD can easily handle it; but a larger DXF file of the same area causes OCAD a problem. Since the smaller file contains everything I need, I am trying to find out why Global Mapper makes two different sizes.

    Thanks for you help. I am going to try a few experiments to see if I can identify something subtle that I may be doing differently.

    Jim
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2009
    Jim,

    There must be some difference in the settings or the original data resulting in th evast size difference. Are the Simplification settings for contour generation the same in both cases? Are all of the DXF export options the same?

    If you want you can zip up the DXF files and email them to support@globalmapper.com and I can take a look to see why one file is so much bigger than the other.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • jlwolfejlwolfe Global Mapper User Posts: 6
    edited January 2009
    Mike,

    My experiments have shown that it is not the DXF file that has the problem; it is the generated contours file. And the problem seems to be triggered by saving (or not saving the workspace). Following is a script of exactly what I do to show you that there is no difference in the settings I am using.

    1. Open the DEM file
    2. Use the Control Center - Options - Alter Elevation Values to set the Elevation Units Interpretation to Feet. For some reason the file seems to be indicating that its units are in meters.
    3. Close the Control Center.
    4. Use the Digitizer Tool, Right Click and Create a New Area Feature
    5. Draw the Area I want and give it a name.
    6. Select the area
    7. Use File - Generate Contours
    Set the interval to 16.4 feet; the X-axis and Y-axis are already at 3.2 feet because of what the file indicates.
    The Simplification and Gridding are not changed; so simplification is at 0.5.
    Use Coutour Bounds and select Crop to Selected Area.

    After this, I Export the DXF file; but that turns out not to be important.

    If I follow the steps exactly as written above, the generated contours are extremely dense with vertices. This is what leads to a very large DXF file. Usually, I Save the Workspace somewhere in the list of steps. If I save the workspace before doing step #7 and after step #3, the generated contours are much more reasonable in the number of vertices. Consequently, the DXF file is a reasonable size. I don't know what about saving the workspace has this effect on generating contours; but it does.

    Sorry I reported this as a DXF file problem; but the initial symptoms seemed to point there. The contours looked the same in Global Mapper either way until I asked it to show me the vertices.

    If you can't reproduce the problem from this description, I can send you the DEM files or you can get them online.

    Thanks for addressing the problem.

    Jim
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2009
    Jim,

    I'm not able to reproduce your problem with a DEM that I have, nor can I think of any reason that saving the workspace would affect the generated contours at all. What version of Global Mapper are you using? Can you provide me with (or point me at) the DEM that you are working with so that I can try the same data that you have?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • jlwolfejlwolfe Global Mapper User Posts: 6
    edited January 2009
    Mike,

    I am using version 9.3.0.0 of Global Mapper. The DEM files I am using come from ftp://pamap.pasda.psu.edu They are in the directory /pamap_lidar/cycle1/DEM/South/2006/300000
    I sometimes have a problem accessing these files through my browser and use an FTP client instead. The files are zipped and are about 16 MB in size.

    The file I did the testing with is 36001580PAS_dem.zip It is just one of perhaps 20-25 that I have downloaded from the psu.edu site. I feel certain that I could reproduce the problem I was having with any of the other files also.

    Jim
  • jlwolfejlwolfe Global Mapper User Posts: 6
    edited January 2009
    Minor correction: the file I tested with is 36001580PAS_dem.tif which was extracted from the .zip file.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2009
    Jim,

    I downloaded that file and ran some tests both with v9.03 and with the latest release and still could not reproduce your problem. I get identically sized output files regardless of whether I save a workspace or not.

    Would it be possible for you to zip up 2 DXF results, one small and one large for me to take a look at? You can FTP the files to ftp.globalmapper.com if they are too large for email. Use a username of 'upload' and a password of 'upload' to gain write access.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • jlwolfejlwolfe Global Mapper User Posts: 6
    edited January 2009
    Mike,

    I can send you the DXFs if you want. But there is really not much to see. Essentially, the large ones look like what you would get if the default simplification factor (during contour generation) were 0.0. There are many, many vertices and the vectors are extremely short. What I would regard as normal DXFs are produced when the simplification during contour generation is 0.5.

    As I said in the previous posting, the problem is not in the exporting of the DXFs; it is in the contour generation. Before my first posting, I had not played much with the options in contour generation. I just let them default. My current theory is that sometimes (whether associated with saving the workspace or the exact content of the workspace), even though the default shows 0.5 in the simplification window, it is actually using 0.0.

    I have tried explicitly setting the simplification factor every time I generate contours and have found that that way it only uses 0.0 when I actually set it to 0.0. So, that is my workaround for the moment.

    I have also tried manipulating the content of the workspace manually copying an area (overlay) from one workspace that seemed to produce normal density contours into a workspace that seemed to produce large density contours and vice versa. I haven't been able to draw any conclusions from that.

    Jim
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited January 2009
    Jim,

    Actually that was the clue that I needed. I took a look and discovered that if you never clicked on the Simplification tab, that no simplification would be used rather than the setting on the Simplification tab. I have placed a new build at http://www.globalmapper.com/global_mapper10.zip that should have this fixed for you to try. Simply download that file and extract the contents into your existing v10.xx installation folder to give it a try.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
Sign In or Register to comment.