I'm exporting layers of a project for a quantum gis postgis table and visualizing the data in gmaps, but the coordinates are very wrong.

Is there any special way to export the quantum gis? The postgres table is using 4326 SRID like gmaps.

My shape in gmaps:


  • You can select the export CRS in the "Save As..." dialog box.
    – Micha
    Sep 21, 2012 at 6:44
  • Explain in detais how are you doing that.
    – Pablo
    Sep 21, 2012 at 12:52

1 Answer 1


settings->project settings: here enable "on the fly CRS Transformation" and now you choose wgs84 (epsg 4326).

now import your shapefile.

in the left pane rightclick on your shapefile-layer and click save as in the context-menu: choose for format: kml and for CRS you select: Project CRS.

Now you should be able to load this kml-file into google maps and google earth.

good luck, hope this helps!

enter image description here

edit: oops your are using database-layer, nevertheless it should work the same way .. edit2: if you are using windows you could use ogr2gui too (see my answer in this thread Converting projection?, you just have to select the correct database source)

  • i make this, setted the project crs: i46.tinypic.com/10z8voo.png and exported the layer as project crs:i46.tinypic.com/2zrzygj.png and the result is the same Sep 21, 2012 at 16:36
  • no, i use a shape file .shp, i read this in qgis, export kml, import kml to postgis via PHP, and return data in web on a gmap Sep 21, 2012 at 16:52
  • @Ciro Vargas: I suppose that the problem occurs later in your workflow. for clarifaction: please load the from qgis exported kml to a webserver. now paste this url into the search box of google maps, e.g. yourwebserver/yourfile.kml. does it look ok?
    – Kurt
    Sep 21, 2012 at 17:27
  • @Ciro Vargas: you could also check your kml with google earth, does it look okay?
    – Kurt
    Sep 21, 2012 at 17:29
  • yes, the error is in my workflow, www.itenho.com.br/teste7.kml see, hmn i pick the coordinates make POLYGON(()) in postgis, because this cause error? Sep 21, 2012 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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