PRINT FROM AUTOCAD
- Decide on the desired background view extents in model space (the Model tab). For simplicity, choose even tens or hundreds for your corner coordinates. Note the corner coordinates of that view.
- In a Layout tab, create an mview with the corner coordinates from step 1. Zoom it in model space to the same coordinates, which puts the zoom factor of the viewport at 1
- Decide how many world units you want to print onto each image pixel. For simplicity, you probably will want to choose an even number and keep in mind that about 70 pixels make 1 inch of normal quality on-screen viewing, 150 pixels per inch is suitable for newspaper quality printing, and 300 ppi for magazine quality printing. For example, your view corner coordinates are 628000(x), 856900(y) to 630600(x), 858800(y). By subtracting the x's and the y's, you calculate view size is 2600(x), 1900(y). If you printed 100 units on every pixel, you would get a 26 pixel by 19 pixel image, which would not have near the required resolution. If you printed 10 units per pixel, you would get a 260x190 image, which would look good on-screen only as a 4" image. If you printed 1 unit per pixel, you get a 2600x1900 image, which would plot on-screen as large as 36 inches. You decide to use that even though it is on the big size, since it seems not too much larger than modern screen pixel sizes.
- Open the AutoCAD print dialog and choose the (Publish To Web) JPG (best for photographs) printer (HEC-RAS can't currently use PNG (best for line drawings)). Select the Properties button next to the printer. Select Custom Paper Sizes and Add or Edit a size with your resulting image size from step 3. Example: 2600 width, 1900 height. Close the properties, saving to the PC3 file.
- Select the paper size (image size) you just created. Print a Window using the corner coordinates from step 1. Change or note the name and location of the plotted image file AutoCAD creates. Check the finished plot by viewing it outside AutoCAD from Windows Explorer.
CREATE A WORLD FILE
ESRI created the World File format to provide a way to reference image files to world coordinates. HEC-RAS uses that format.
To create a world file format, you need to know how to create and edit plain text files in Windows Explorer (the files and folders view of Windows). This is easiest if you use ALT+T (Tools menu) > Folder Options > View tab and uncheck the "Hide extensions for known file types" option.
- Use File > New or Right-click New to create a new Text Document file in the same folder with the background image file you plotted from AutoCAD.
- Open the New Text Document.txt and type into it on line 1 the width of a pixel in world units, on line two 0 rotation, on line 3 0 rotation, on line 4 the NEGATIVE height of a pixel in world units, on line 5 the x-coordinate of the center of upper left pixel, and on line 6 the y-coordinate of the center of upper left pixel. Don't forget to calculate the CENTER coordinates of the upper left pixel. Our example file is given below this list. Save and exit the file.
- Change the world file name to match the name of the background image file, but with the extension changed to these three characters: the same first letter, the same last letter, and a "w". For example, map.jpg uses map.jgw, map.tif uses map.tfw, and map.png uses map.pgw.
Example world file:
ADD BACKGROUND PICTURE
In the HEC-RAS Geometric Data window, follow this procedure from the HEC-RAS help file: Open the Geometric Data editor and create a New Geometry File. Add the background data by clicking on the Add Background Data button. If the image does not come in correctly, select the View, Set Schematic Plot Extents menu item and press the Set to Computed Plot Extents button in the Geometry Extents window. This will zoom out the bounds of the image.
If you have any trouble, just leave a comment below.