Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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? postgres table is using 4326 SRID like gmaps

my shape in gmaps: http://i48.tinypic.com/2iay3r9.png

qgis: http://i50.tinypic.com/24d28wl.png

share|improve this question
    
You can select the export CRS in the "Save As..." dialog box. –  Micha Sep 21 '12 at 6:44
    
Explain in detais how are you doing that. –  Pablo Sep 21 '12 at 12:52

1 Answer 1

up vote 3 down vote accepted

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 How to convert projection, you just have to select the correct database source)

share|improve this answer
    
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 –  Ciro Vargas Sep 21 '12 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 –  Ciro Vargas Sep 21 '12 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 '12 at 17:27
    
@Ciro Vargas: you could also check your kml with google earth, does it look okay? –  Kurt Sep 21 '12 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? –  Ciro Vargas Sep 21 '12 at 18:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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