Hello there, I think KML files are always in the EPSG:4326 (WGS 84). Therefore, to import them in QGIS, you must always assume that CRS. If you want to overlay it over other data in a diferent CRS, you must turn the "On Fly CRS transformation" in the project settings.
EPSG:4326 (WGS 84) and EPSG: 900913 (Google Mercator) are not the same, one is a geographic coordinate system (Lat, Long in degrees), the other is a projected cartesian system (X, Y in meters). Thats why the shape will not be in the right place, and won't be with the right size. In a EPSG:900913 project, without the "On the Fly transformation" checked, QGIS will always assume that all layers are in that same CRS, therefore will assume the coordinates in meters instead of degrees. Hope I helped. Alexandre Neto On Fri, Feb 10, 2012 at 4:41 PM, spiderplant0 <spiderpla...@gmail.com>wrote: > I am having problems importing KML vectors into QGIS. > To try and figure out whats going wrong I carried out an experiment... > > In QGIS, created a simple vector shapefile containing one polygon (set to > EPSG900913). > Used QGIS to save it as an KML. > Tested this KML out in Google Earth - the polygon was in the correct place > - > so far so good. > Imported the KML back into QGIS ( Menu > Layer > Add Vector layer). This > doesnt work. The polygon is distorted, in completely the wrong place and > very small (maybe its regarding the degrees latitude and longitude as > metres?) > > I notice there is no mention of the map projection in the KML. How does it > know what to use? Under the layer properties in QGIS it seems to be set to > 'EPSG:4326 - WGS 84'. This is not what I want (EPSG900913). But I believe > these EPSGs are similar and so doesnt account for the massive change in > position, size, etc. Changing the CRS in layer properties didnt help. > > The only way I could figure out to get it to display properly was to 'save > as shapefile' and set to EPSG900913. Then reload this shape file into > QGIS. > > Is there a simpler way. Ie get QGIS to display the KML directly? > > Here is a link to the shapefile (test3_epsg900913) and the KML > (test3b.kml)... > > https://docs.google.com/open?id=0B93lksnTC7_cMGMzMTNiMTEtNThiNi00ZjQ5LWIzZTMtNzg2MjZhMmM3ZTIy > > https://docs.google.com/open?id=0B93lksnTC7_cMGMzMTNiMTEtNThiNi00ZjQ5LWIzZTMtNzg2MjZhMmM3ZTIy > The polygon should appear on top of an island of the coast of Scotland. > I'm using QGIS 1.7.3. > > Thank. > > > -- > View this message in context: > http://osgeo-org.1560.n6.nabble.com/KML-import-into-QGIS-problems-and-confusion-tp4383869p4383869.html > Sent from the Quantum GIS - User mailing list archive at Nabble.com. > _______________________________________________ > Qgis-user mailing list > Qgis-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-user >
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user