<div>Hi Olivier,</div><div><br></div><div> Thank you for the help.</div><div><br></div><div> Now I'm getting another problem, look below. Is there anything I can do?</div><div><br></div><div><br></div><div><div>$ ogrinfo doc.kml </div>
<div>ERROR 4: No layers in KML file: doc.kml.</div><div>FAILURE:</div><div>Unable to open datasource `doc.kml' with the following drivers.</div><div> -> ESRI Shapefile</div><div> -> MapInfo File</div><div> -> UK .NTF</div>
<div> -> SDTS</div><div> -> TIGER</div><div> -> S57</div><div> -> DGN</div><div> -> VRT</div><div> -> REC</div><div> -> Memory</div><div> -> BNA</div><div> -> CSV</div><div> -> GML</div>
<div> -> GPX</div><div> -> KML <--------- Here is KML</div><div> -> GeoJSON</div><div> -> Interlis 1</div><div> -> Interlis 2</div><div> -> GMT</div><div> -> SQLite</div>
<div> -> ODBC</div><div> -> PGeo</div><div> -> OGDI</div><div> -> PostgreSQL</div><div> -> MySQL</div><div> -> PCIDSK</div><div> -> XPlane</div><div> -> AVCBin</div><div> -> AVCE00</div>
<div> -> DXF</div><div> -> Geoconcept</div><div> -> GeoRSS</div><div> -> GPSTrackMaker</div><div> -> VFK</div></div><div><br></div><br><br><div class="gmail_quote">On Mon, Oct 4, 2010 at 9:16 AM, Olivier Courtin <span dir="ltr"><<a href="mailto:olivier.courtin@oslandia.com">olivier.courtin@oslandia.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
On Oct 4, 2010, at 2:09 PM, Paulo Angelo wrote:<br>
<br>
Hi Paulo,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How can I convert a KML file to PostGIS?<br>
</blockquote>
<br></div>
If you need to convert a KML geometry fragment, you could use<br>
native ST_GeomFromKML function. (since PostGIS 1.5)<br>
<a href="http://postgis.refractions.net/docs/ST_GeomFromKML.html" target="_blank">http://postgis.refractions.net/docs/ST_GeomFromKML.html</a><br>
<br>
And if you need to convert a whole KML document,<br>
consider ogr2ogr from GDAL.<br>
<a href="http://www.gdal.org/ogr/drv_kml.html" target="_blank">http://www.gdal.org/ogr/drv_kml.html</a><br>
<br>
HTH,<br><font color="#888888">
<br>
--<br>
Olivier<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</font></blockquote></div><br>