Generate a Background Image File with World File for XPSWMM

Generate a Background Image File with World File for XPSWMM

XPSWMM can load an image raster file as background to facilitate the drainage network creation. The image file needs to have a world file associated with so that XPSWMM is able to use the world file’s coordinates to position the background image.

A world file can be generated by a lot of QGIS built-in raster tools, such as Save As…, Clip, Translate (Convert Format), and Warp. For example, when using “Export —> Save As…” command (Figure 1), Click the green color “+” button to add an additional row in “Profile” under “Create Options” or “Advanced Parameters” and type in tfw under Name field (here the Save As output file format is set as a *.tif file) and yes under Value field (Figure 2).

Figure 1
Figure 2

Sometimes an image file can not be displayed correctly in XPSWMM (Figure 3), and using the “Rendered image” option of “Save As…” may fix the display issue (Figure 4).

Figure 3
Figure 4

In Figure 4, make sure to check on the “Rendered image” option and type in tfw and yes for Name and Value fields under Profile to create a world file to associate with the newly created rendered image. At this step, if you want to reduce the rendered image file size, you can also compress it at the same time using COMPRESS – DEFLATE (refer to this post for details about raster file compression) as show in Figure 5.

Figure 5

As expected, the newly created rendered image file with a world file associated with can be displayed in XPSWMM correctly (Figure 6).

Figure 6

Leave a Reply

Your email address will not be published.