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

ogr2ogr "KML" LINE.kml LINE.shp

to




        
        
        
        

ogr2ogr
-s_srs EPSG:27700 -t_srs WGS84 -f "KML" LINE.kml LINE.shp

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).

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?

Thanks,

Mattias



Subject: Re: [gdal-dev] ogr2ogr .SHP to .KML conversion problem
From: [email protected]
Date: Tue, 2 Feb 2010 18:06:28 -0500
CC: [email protected]
To: [email protected]



Use gdal_translate --version
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
On Feb 2, 2010, at 4:01 PM, Mattias Carlsson wrote:Hi,

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 
<http://www.nationalgrid.com/uk/LandandDevelopment/DDC/GasElectricNW/undergroundcables/shape/>
 to .kml and try using

>ogr2ogr -f "KML" LINE.kml LINE.shp

but get a buffer overflow (I can send a backtrace if this would help):

>*** buffer overflow detected ***: ogr2ogr terminated

(btw, I am using Ubuntu 9.10)

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...

Thanks!

\Mattias

Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now. 
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
                                          
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to