<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
OK, so I got the conversion working, probably a newbie mistake, as the solution was mainly to switch datum, i.e. change the command from<br><br><span style="background: transparent none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">ogr2ogr "KML" LINE.kml LINE.shp</span><br><br>to<br><br>
        <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
        <title></title>
        <meta name="GENERATOR" content="OpenOffice.org 3.1 (Linux)">
        <style type="text/css">
        <!--
                @page { margin: 2cm }
                P { margin-bottom: 0.21cm }
        -->
        </style>
<p class="western" style="margin-bottom: 0cm;"><span style="background: transparent none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">ogr2ogr
-s_srs EPSG:27700 -t_srs WGS84 -f "KML" LINE.kml LINE.shp</span></p>
<br>However, before realising that, I managed to compile and install gdal 1.7. Using gdal 1.7 did not crash reading the file using the initial command line but gave a warning about coordinates exceeding limits, and from this I eventually realised my error! Thus, I am not sure whether gdal 1.5 would still work using the correct conversion (probably).<br><br>The next problem is to display the kml file on a map; there are about 500 polylines ranging from a few to hundreds of points each. Sending this to google maps (by using "My Maps"->"Import") displays the data over several tabs, which is undesirable. Any ideas on how to display all the data simultaneously?<br><br>Thanks,<br><br>Mattias<br><br><br><br><hr id="stopSpelling">Subject: Re: [gdal-dev] ogr2ogr .SHP to .KML conversion problem<br>From: gregcoats@mac.com<br>Date: Tue, 2 Feb 2010 18:06:28 -0500<br>CC: gdal-dev@lists.osgeo.org<br>To: powerphysics@hotmail.com<br><br>
<base><div>Use gdal_translate --version</div><div><br></div><div>Since you told me that you are using GDAL version 1.5.0 from December 2007, I suggest that you upgrade to GDAL 1.7.0 from January 2010. Greg</div><div><br></div><div><div>On Feb 2, 2010, at 4:01 PM, Mattias Carlsson wrote:</div><br class="ecxApple-interchange-newline"><blockquote><div class="ecxhmmessage" style="font-size: 10pt; font-family: Verdana;">Hi,<br><br>I am trying to learn how to use ogr2ogr to convert a shapefile to kml, but fail to do so and cannot understand whether I am at all on the right track or completely lost (very much beginner in GIS). I would like to convert either, or all, of the files on <<a href="http://www.nationalgrid.com/uk/LandandDevelopment/DDC/GasElectricNW/undergroundcables/shape/">http://www.nationalgrid.com/uk/LandandDevelopment/DDC/GasElectricNW/undergroundcables/shape/</a>> to .kml and try using<br><br>>ogr2ogr -f "KML" LINE.kml LINE.shp<br><br>but get a buffer overflow (I can send a backtrace if this would help):<br><br>>*** buffer overflow detected ***: ogr2ogr terminated<br><br>(btw, I am using Ubuntu 9.10)<br><br>Apologies if this is the wrong forum or totally basic, but after many frustrations I am getting desperate and, please, please, guide me in the right direction...<br><br>Thanks!<br><br>\Mattias<br><br><hr>Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.<span class="ecxApple-converted-space"> </span><a href="https://signup.live.com/signup.aspx?id=60969">Sign up now.</a><span class="ecxApple-converted-space"> </span>_______________________________________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></div></blockquote></div><br>                                            <br /><hr />Hotmail: Trusted email with Microsoft’s powerful SPAM protection. <a href='https://signup.live.com/signup.aspx?id=60969' target='_new'>Sign up now.</a></body>
</html>