Scaling an Image
Updated July 08, 2021
This article applies to:
- Terrain 3D
- Terrain Forestry
- RoadEng Civil
- RoadEng Forestry
This Knowledge Base article is an excerpt from one of our tutorial files. The files referenced in the article, as well as the full tutorial document, are available in our Tutorial Installer.
Real-estate Areas Example
In this example, we will measure a feature of known length on the image. The image will then be scaled (by setting the pixel size) so that the feature has the correct length. The image is not corrected for position and rotation.
We will provide options for both metric and English (feet) units. Use menu Setup | Module Setup | Units tab, if you want to change units.
Note: See Getting Started section for file install folders (<Terrain> and <Defaults and Layouts>)
File | New.
View | Retrieve Screen Layout. Select file <Defaults and Layouts>\Training\ training bitmap scale.ilt. Press OK.
This screen layout sets options such as Plan Window location and scale. To check which options have been set in the Plan Window, right-click in the plan window select Active Window (Plan) Options.
Home | Insert File button to open the Insert File dialogue box.
Figure 1: Insert File Dialogue
Ensure the file type drop-down is set to either All Supported Files or Image Files (*.asc,*.txt, …) as shown in the figure above.
Select <Terrain>\ Bitmap\o-falls.jpg. Press Open.
You will be presented with the Import Options dialogue box as shown below.
Figure 2: Image Import Options Dialogue
(Used to Geo-Reference and Scale Bitmaps)
The Pixels area is used for scaling the image.
Note: If the natural scale and the dots per inch (dpi) are known then the pixel size can be calculated using the following formula:
An image was scanned at 200dpi (dots per inch) and the natural scale is 1:12000. Hence:
Pixel size = 1map-inch * 12000inch * 25.4mm * 1.0m
200pixel 1map-inch 1inch 1000mm
= 1.524 m/pixel
We won’t change any of the import options – we’ll determine pixel size later.
Press OK to import the image.
The newly inserted image is selected; when an image is selected, the rectangle is hatched magenta.
Click outside the image to de-select.
View | Zoom Extents button.
The Plan window now displays the imported bitmap as shown in figure below.
Figure 3: Imported Bitmap
Zoom in so the scale bars are clearly visible.
In this example, the natural scale is known, but the dots per inch are not. By measuring the scale bar, you will be able calculate the pixel size. This map has three scale bars. If you are working in meters, measure “Scale of Meters”; if you are working in feet, measure “Scale of Feet”.
Measure the scale bar:
With the cursor in the Plan Window, right-click and choose Measure Tool (length, area) from the menu.
Move the mouse until the cross-hair is over one end of the scale bar and left-click.
Move the mouse over to the other end of the scale bar and hover.
You can observe the length in two ways:
The tooltip window (hover tip).
The Measurement group toolbar (this appeared at the lower left of your screen when you entered measure mode).
Figure 4: Measure Tool Hover Tip
Figure 5: Home | Measurement Group
The “Scale of Metres” bar should be approximately 652 m long. This length is clearly incorrect; it should be 1000 m, so the image must be re-scaled.
If you were working in feet, you would find that the “Scale of Feet” scale bar is 600ft long; similarly, this should be 3000 feet, so image must be re-scaled.
Right-click, select Stop Measuring (or just type <escape>) to get out of measure mode.
Note: The Measure Tool does not disable editing with the mouse; this can be useful but most of the time you will want to be in selection mode before you use the Measure Tool.
Now we will re-scale the image by changing the pixel size:
Left-click on the bitmap select it.
Feature Tools | Feature Properties to open the Image Import Options dialogue box, as shown in the Image Import Options figure above.
The current pixel size is set to 1.0. Scale it by multiplying by the true scale bar length divided by the measured scale bar length:
New Pixel Size (m) = 1.0m * 1000.0m/652m = 1.534 m
New Pixel Size (ft) = 1.0ft * 3000.0ft/595.5.8ft = 5.038 ft
Type the appropriate pixel size (1.534 m or 5.038 ft) into both the X size and Y size.
Press OK to close the dialogue box.
The image is scaled correctly. If the image were distorted then the process should be repeated using a vertical feature of known length to calculate the Y size.
If desired, verify the image is scaled correctly by measuring the scale bar again.