Urban designers and various construction professionals will, at some point in their career, be tasked to draft up plans of city maps or locations with little to no source materials available to copy. In these cases, Google Maps would often be a drafter’s best friend.
But with the daunting task of manually tracing over a Google Maps screenshot to copy the needed map information, most drafting professionals find that using Google Maps as a reference is somewhat tedious and inefficient. Luckily, users can do a bulk of the work of converting the map into a vector file using some clever tricks with Google Chrome’s source code and Scan2CAD’s automatic raster-to-vector functionalities.
Video tutorial: Converting Google Maps to DWG
Here are the steps to converting a google map export into a workable vector file using Scan2CAD:
Part 1: Exporting a suitable raster image of a map from Google Maps
Step 1 – Navigate to the location you want to vectorize in Google Maps.
Find the zoom level and map placement that works best for you. Be careful not to zoom out too much that there would be an unnecessary amount of details in the image. Also, take care not to zoom in too close that you would be clipping out parts of the map you want to vectorize.
Step 2 – Set it to Map view and not Satellite view.
For most circumstances, we’ll be wanting to vectorize the Map view of the image and not the Satellite version. With any conversion process, the key factor in determining the success of the conversion is the quality of the source image. The raster map we would end up working with when we import using the Satellite view would be more realistic, but it would also have more unnecessary details, shadows, and perspective distortion. Resulting vector images converted from these files would most likely have these issues as well.
Step 3 – Take out the labels on the Map view.
While we can easily do away with the overlay of labels when on the Satellite view, there isn’t a native way to take out the labels in Map view with the current version of Google Maps (Note: If you somehow have access to an older version of Google Maps, there should be an option to do away with labels in Map view). Fortunately, there’s a way for us to work with the source code of the page to finagle our way to a label-free Map view. Do note that if at any point you that you’ve made a mistake along the way, just feel free to refresh the page and start from the first step.
- In Satellite view, toggle labels off under the Satellite option in the left “hamburger” pop-out menu . Right-click the Labels off option and click on Inspect at the bottom of the pop-up menu. A dialog box full of the page’s source code should open up to the right of the page.
- Click on Labels off again to turn the labels back on. A new line of code should pop up in the dialog box next to ‘Labels off’ that says: style=”display: none;”
Delete this line of code and press Enter. What this does is it makes the Labels off option that you clicked on in the previous step be viewable and clickable. It should be right next to Labels on under the Satellite option in the left pop-up menu on the page, so feel free to double-check if it’s there to make sure you’ve done the process correctly.
- Switch back to Map view at this point. In the dialog box of source code, scroll up slightly and find the same line of text that you had deleted in the previous step: style=”display: none;”
It should be slightly above the lines of code that have “Labels on” and “Labels off”. Again, delete this line of code and press Enter to execute. You will now find that the Labels on and Labels off under the Satellite option in the left pop-out menu are viewable even though we’re on Map mode. Take out the labels on your Map view by clicking on Labels off.
Step 4 – At this point, you can go ahead and export the map for you to work on it later on Scan2CAD.
You can screenshot the map with your preferred screen capture tool or you could export it as a PDF. To export it as a PDF, just click on Print in the left pop-out menu. The option would be at the bottom of the list. Click on Print at the top-right corner of the window that opens up. From there, set up these following setting options in the dialog box that follows:
- Destination: Save as PDF
- Pages: All
- Layout: Portrait/Landscape (your discretion)
- Paper size: A0 (or the largest available size you can select)
Click on Save and save your label-free Map file in your preferred file location.
Part 2: Using Scan2CAD to convert the Google Maps file into a workable vector file
Step 1 – Open up the screenshot or the PDF file of the Google Map image you want to convert.
Scan2CAD can handle most raster image and PDF file formats, but if you did end up exporting a PDF file in the previous part, there’s an extra step involved.
If you ended up taking a simple screenshot, feel free to skip the next step.
Step 2 – Delete the Vector part of the PDF file.
Sometimes after exporting a PDF map from Google Maps, the PDF file will also contain a black rectangular vector image. When opening up a PDF file on Scan2CAD, the program will open both the raster and vector parts of the PDF. You can do away with the vector part of the Google Maps PDF by closing the Vector tab that Scan2CAD opens up.
Simply right-click the tab header and select “Close File”. Choose not to save in the dialog box that follows.
Step 3 – Clean up the contents of the Raster tab.
Click on the Clean image tool and a dialog box will pop up. Click on Threshold to turn the image black and white. Experiment with the Simple Threshold slider to find a level that will accurately depict all the necessary details in the image. Values of 230-250 will usually yield good results, but feel free to find a value that works best for your own image.
With the preview image in the dialog box as your reference, aim to get continuous, non-breaking lines and just the right amount of detail that would yield good conversion results. The Smooth and Thicken Lines options might also help with getting a better quality black-and-white image.
Note: You can use the manual editing tools to the left of the Scan2CAD interface to do clean-ups manually. These include the lines tool, rectangle tool, and eraser tool.
Step 4 – Convert the cleaned-up image.
Click on the Convert image button next to Clean image and a dialog box will pop up. For maps, you’ll want to stick to these settings:
- Vectorization Method: Technical
- Options: Vectorize
- Vectorization presets: Architectural
There are various settings you can tweak under the Object Identification tab and some in-depth tutorials on them can be found here in our website, but as a rule of thumb, just make sure to tick all the geometric objects that you know are in the image and untick all of those that aren’t.
The same general rule applies to the options under the Line Tolerance tab in the dialog box.
Once you’re done with the settings, click on Run to generate a preview of the converted image. If you’re happy with the generated preview, click on OK.
Step 5 – Set the scale of the image and do your last-minute edits before saving the converted vector file.
Click on the Measure and scale tool . Set your preferred units in the Unit settings on the right side of the interface and make sure to tick “Snap to End Points”.
Look for a part of your image that has a measurement you are sure of (e.g. a road that you know is 150 ft long, a building edge you know is 100 ft wide, etc.). Click and drag the measurement tool to the two opposite endpoints of that part of your image and then click on Calibrate. This should set the scale of your image right.
Feel free to do your last-minute edits on the converted vector file using the tools that Scan2CAD has. If you have anything more than minor edits to make, you might be better off doing those in your preferred CAD software after saving the converted vector file using Scan2CAD.
Step 6 – Save the converted vector file.
At this point, if you’re happy with the edits and scaling of your converted vector file, all that’s left is to save the file. Click on File > Save as > Vector and in the dialog box that opens, choose the file format that you prefer. If you’re working with a CAD program to edit the converted file, you’ll most likely want to choose DWG or DXF.