3

I am a real beginner with QGIS. I have shape files of my study site. I would like to have the nice google earth background. I would like to be able to see my files in Google earth, then I can zoom and see details at a fine scale. from what I understood, I need to export my files as kml files. I clicked right on the layer and clicked on "saved as", I chose a place to save and a name for the file, I chose WGS 84, and saved. When I open the kml layer in Google earth and/or QGIS it is completely wrong. In Google earth, appears some segments every where on the globe; in QGIS, I have on the right a vertical line. Can anyone explain to me what goes wrong?

  • 1
    I'm late to the game, but .shp files can be loaded into Google Earth. – Kingfisher Apr 25 '16 at 19:02
2

From the details you gave, I assume your shapefile is set to a wrong projection.

Easiest way to check it is installing the Openlayers plugin, and load a Google or Openstreetmap background. Project CRS must be set to EPSG:3857, and On-the-fly-projection enabled under Settings->Project Settings.

You can check the CRS your layer is set to with rightclick -> Set CRS for layer. Also, have a look at the extent of the layer with Rightclick -> Properties in the Metadata tab

Please report the CRS and extent to investigate further.

1

What's your project's Coordinate Reference System set to?

Go to Project Properties, and look at the "Coordinate Reference System (CRS)" tab. You may have your project set to a different CRS than your study site's shape files. Raw traces from GPS often load up with a CRS of "WGS 84 (EPSG:4326)", so maybe your project has inherited the wrong CRS.

I find it helpful to "Enable 'on the fly' CRS transformation" in the Project Properties CRS tab. This allows QGIS to correct for files in different CRSs automatically, at the cost of some extra redraw time.

Another tool I use to check that the project is set up correctly is Barry Rowlingson's Click-Fu plugin. It's a little work to install (Go to Plugins - Fetch Python Plugins, choose the Respositories tab, and add

Name : Barry Rowlingson's Plugins
URL  : http://www.maths.lancs.ac.uk/~rowlings/Qgis/Plugins/plugins.xml

If you go back to the Plugins tab, you can install Click-Fu. It gives you a new menu that, when you choose one of the items, the location you click in your project will open in your browser in Google Maps, or OpenStreetMap. If Click-Fu gets the right location, then you know your project is set up correctly.

When the project CRS is set up, you can save shape files to KML, and you won't need to choose WGS 84 as the CRS. QGIS will do the transformation for you.

1

http://www.zonums.com/shp2kml.html will do it for you if you just want a simple free solution.

Google Earth pro does it automatically but at $400...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.