QGIS is a Geographical Information System. It is a desktop application for working with geospatial data. It is free and open source. QGIS is available on Linux, Mac OS and Windows. So It is cross platform. QGIS is used to create maps, edit maps, view maps and do all types of digital geo drawings. QGIS is a vector based program, which means all the geospatial data you draw in QGIS is vectors. The advantage is that it will always look good no matter how much you zoom.You can import Google Earth, Google Maps, Google Satellite, Google Terrain, Google Roads data into QGIS 3 and digitalize them if you want. In this article, I will show you how. Let’s get started.
Exporting Map Data from Google Earth
You can export placemark points from Google Earth as kml file. To do that, first open Google Earth and you should see something like this.
Now search for a place that you want to export. In my case, I searched for University of California, Berkley as you can see in the screenshot below.
Now click on the Placemark icon as marked in the screenshot below.
You should see a New Placemark dialog box as shown in the screenshot below.
Set the Name to something meaningful and click on the OK button.
The Placemark should be added to your My Places section as you can see in marked section of the screenshot below.
Now Right Click on the Placemark you’ve just saved and click on Save Place As… as marked in the screenshot below.
You should see the following Save file… dialog box. Now type in a meaningful File name.
Then click on the Files of type and pick Kml.
Once you’re done, it should look as follows. Now click on Save to save the file.
Importing Google Earth Placemark into QGIS 3
Now you have to import that Placemark into QGIS 3. But before you can do that, you need a reference map of Google. Otherwise a simple point would mean nothing. So how do we get a reference map?
On earlier version of QGIS, which is QGIS 2, you can use a plugin called OpenLayers to get a reference map of Google Maps. But in QGIS 3, the plugin no longer works. The developer still didn’t update it for QGIS 3. But the good news is, Google provides a way to get XYZ tiles of their map service and QGIS 3 now supports XYZ tiles as well. So that’s how you’re going to get a reference map of Google Map service in QGIS 3.
Open QGIS 3 and you should see the following window.
Now Right Click on the XYZ Titles from the Browser and click on New Connection… as marked in the screenshot below.
You should see the following XYZ Connection dialog box.
First I am going to add Google Maps XYZ Titles connection. So I will set the Name to Google Maps as shown in the marked section of the screenshot below.
Now you need a URL for the Google Maps XYZ Titles service. The URL is given below:
Copy and Paste the URL into the URL section as marked in the screenshot below.
Now set Max. Zoom Level to 19 as marked in the screenshot below.
Now you can find Google Maps in the XYZ Tiles section as marked in the screenshot below.
Now to open Google Maps, double click on Google Maps in the XYZ Tiles section. It should open up as shown in the screenshot below.
Now you can add as many Google Earth Placemarks as you want. To add a Placemark, click on Layer from the menu and then go to Add Layer and then click on Add Raster Layer… as marked in the screenshot below.
You should see the following window.
Now click on the … button as marked in the screenshot below to select a Vector Dataset(s).
A File Browser should open up. Select the kml file you’ve saved from Google Earth and click on Open.
Now click on Add to add it as a new Layer.
As you can see in the marked section of the Layers panel, the Placemark was added.
Now click on Close.
You should see a small point as marked in the screenshot below.
Now click on the Zoom icon and zoom into the Placemark.
As you can see, it’s getting closer.
I zoomed in more.
Now the Placemark can be clearly seen. You can also add a reference to Google Satellite, Google Terrain and Google Roads. Just add another XYZ Tiles and the URLs are given bellow:
Google Satellite Hybrid:
You can add all these XYZ Tiles and enable or disable them as you need from the Layers panel.
Working with Google Map Data with QGIS 3
In this section, I will show you how to highlight some direction lines in the Google Map with QGIS 3. This is what I have opened in QGIS 3 right now.
Click on New Shapefile icon as marked in the screenshot below.
You should see the following window.
Click on the … icon as marked in the screenshot and save the file.
Now select Geometry type to Line.
Now click on OK.
Now click on Toggle Editing.
Now click on Add Line Feature.
Now click and make a line shape with it. Once you’re done, press the Right Mouse Button. You should see the following dialog box. Click on OK.
A Line should be draw, as shown in the screenshot below.
Now double click the Lines Layer and go to Symbology and then select Simple line.
Now change the Color and Stroke width as you need. Once you’re happy, click on OK.
As you can see, the lines are wider now.
You can do a lot more customization, but it’s out of the scope of this article. Anyway, thanks for reading this article.