Inserting Bitmaps (for example from Goolge Maps) into QCAD

Tips and tricks you want to share with other users. Tutorials, user submitted documentation, etc.

Moderator: andrew

Post Reply
User avatar
andrew
Site Admin
Posts: 5370
Joined: Fri Mar 30, 2007 6:07 am

Inserting Bitmaps (for example from Goolge Maps) into QCAD

Post by andrew » Thu Sep 10, 2015 1:17 pm

When working on drawings or plans, it is sometimes desirable to insert bitmaps in the background and add drawing elements on top of the bitmap to add vector data or vectorize data from the bitmap.

Bitmaps with map data, for example from Google Maps may be inserted to give an idea of the surroundings of a planned structure or landscaping feature. With QCAD, you can insert bitmaps and move, scale and rotate them into place in a few simple steps outlined below.

Creating the Map
- If you already have the bitmap at hand, you can skip this step.
- Take a screenshot of the map you wish to insert, for example from Google maps
Screen Shot 2015-09-10 at 09.01.08.png
Screen Shot 2015-09-10 at 09.01.08.png (1.44 MiB) Viewed 7295 times
- You might want to crop the screenshot using bitmap manipulation software or Preview under Mac OS X, etc.
Screen Shot 2015-09-10 at 09.01.26.png
Screen Shot 2015-09-10 at 09.01.26.png (1.33 MiB) Viewed 7295 times
- Save the map file into the same directory where you are planning to save the DXF or DWG drawing file. This is highly recommended to keep DXF/DWG and the bitmap file together. When transferring the DXF/DWG file to another computer or sending it to someone else, be sure to always include the bitmaps files. Bitmap files are referenced and NOT embedded in the DXF/DWG file when inserted.

Noting two Distinguished Locations
- Note the location of two distinguished points A and B in the map. The two points should not be too close together. For the most precise result, choose two points as far away from each other as possible.
- To query the longitude/latitude position of a point in Google maps, right click in the map and choose What's here?.
Screen Shot 2015-09-10 at 09.27.55.png
Screen Shot 2015-09-10 at 09.27.55.png (1.43 MiB) Viewed 7295 times
- Copy the coordinates from the bottom of the browser screen into a text document, etc. where you can retrieve them later.
Screen Shot 2015-09-10 at 09.30.08.png
Screen Shot 2015-09-10 at 09.30.08.png (185.13 KiB) Viewed 7295 times
- For this example, the two chosen locations are [latitude,longitude (Swiss Grid projection)]:
A: 47.379562, 8.516015 (681360,248194)
B: 47.356608, 8.562908 (684937,245692)
Since latitude and longitude are polar coordinates, they are not suitable for working with CAD, so we convert them to a common local coordinate system using a map projection, here Swiss grid.

Inserting the Map into QCAD
- In QCAD, create a drawing. The unit of the drawing is typically set to the unit used for the chosen map projection but can also be set to None.
- Choose Draw > Insert Bitmap
- Insert the bitmap anywhere in your drawing. Don't try to position or scale it correctly at this point.
Screen Shot 2015-09-10 at 09.23.31.png
Screen Shot 2015-09-10 at 09.23.31.png (205.13 KiB) Viewed 7295 times
- You might want to move the bitmap into the background of your drawing by selecting it and then choosing Modify > Send to Back
- To draw on top of the bitmap, it can be useful to fade the bitmap (make it transparent) to make it less distracting. The bitmap transparency can be adjusted in the property editor: View > Property Editor, select the bitmap and adjust the Fade property:
Screen Shot 2015-10-05 at 09.57.35.png
Screen Shot 2015-10-05 at 09.57.35.png (71.54 KiB) Viewed 7068 times
Positioning and Scaling the Map
- Select the inserted map. You can do this by clicking close to its border. The map is now surrounded by a red rectangle to indicate that it is selected.
- Choose Modify > Align Reference Points
- Disable auto snap by clicking on the Free snap button at the left and make sure that the tool option Scale is enabled.
Screen Shot 2015-09-10 at 09.38.26.png
Screen Shot 2015-09-10 at 09.38.26.png (82.01 KiB) Viewed 7295 times
- Click the first reference point A in the map.
- In the command line, enter the known position of point A and press enter:
681360,248194
- Click the second reference point B in the map.
- In the command line, enter the known position of point B and press enter:
684937,245692
Screen Shot 2015-09-10 at 14.56.38.png
Screen Shot 2015-09-10 at 14.56.38.png (1.91 MiB) Viewed 7293 times
Notes
Be sure to verify the result by measuring different locations and distances in the map before using it. For larger areas, this method will not yield precise results since Google Earth shows the earth as round, viewed from top without any map projection applied. Google Maps uses the Web Mercator projection.

Post Reply

Return to “QCAD Tips and Tutorials”