Singing the ECW Blues

I had two cases this week regarding the ECW format. The cases were from the same customer and the users are working on the same project. This may have been the first time I've ever dealt with this raster image format.

Problem 1: "The ECW file disappears if I am in a view other than 'Top' or if the UCS changes in any way. "


The image really isn't disappearing; it is just slow to regenerate. First, flip flop between perspective and orthographic view in your active 3D viewport. This will jog civil 3D into displaying the ECW. Type PERSPECTIVE at the command line; 0 means orthographic, 1 means perspective.

However, you need to be patient. The image is there, but it may be painfully slow. ECW is a "lossy" format, which means it can achieve much higher image compression than say, a SID. In AutoCAD Civil 3D or Map 3D, every time you pan, zoom or change UCS, AutoCAD needs to regenerate the file. The file is constantly getting re-uncompressed, because the uncompressed ECW would be WAY too large for AutoCAD to handle.

Problem 2: "ECW moves in paperspace."

If you have an ECW in model space and want to plot it, you need to be careful. If your viewport is not rotated, everything should be fine.

If you change the view angle in the viewport, the ECW moves slightly.

The first image shows an ECW in a viewport. The magenta lines are drawn in model space for reference.
In the second image, the viewport has been rotated by a degree. We would expect that the magenta lines and image would still line up, but they don't.
This is a known issue and well documented.

Solution to all of the above: 

The cleanest option right now is to convert the ECW files to a different format. If you have ESRI software, you can do it there. Another option is to download the free ER Viewer from Hexagon (a part of Intergraph, ECW is Intergraph's format).

By converting your image to a lossless TIFF or  JPEG you are going to get much better performance. You may want to break the image up into multiple tiles to prevent any single image from being too huge. 

Have a great weekend!

No comments:

Post a Comment