[postgis-users] KML to PostGIS

Paulo Angelo pa at pauloangelo.com
Mon Oct 4 05:40:24 PDT 2010


Hi Olivier,

   Thank you for the help.

    Now I'm getting another problem, look below. Is there anything I can do?


$ ogrinfo  doc.kml
ERROR 4: No layers in KML file: doc.kml.
FAILURE:
Unable to open datasource `doc.kml' with the following drivers.
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> DGN
  -> VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> GML
  -> GPX
  -> KML                              <--------- Here is KML
  -> GeoJSON
  -> Interlis 1
  -> Interlis 2
  -> GMT
  -> SQLite
  -> ODBC
  -> PGeo
  -> OGDI
  -> PostgreSQL
  -> MySQL
  -> PCIDSK
  -> XPlane
  -> AVCBin
  -> AVCE00
  -> DXF
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK



On Mon, Oct 4, 2010 at 9:16 AM, Olivier Courtin <
olivier.courtin at oslandia.com> wrote:

>
> On Oct 4, 2010, at 2:09 PM, Paulo Angelo wrote:
>
> Hi Paulo,
>
>
>  How can I convert a KML file to PostGIS?
>>
>
> If you need to convert a KML geometry fragment, you could use
> native ST_GeomFromKML function. (since PostGIS 1.5)
> http://postgis.refractions.net/docs/ST_GeomFromKML.html
>
> And if you need to convert a whole KML document,
> consider ogr2ogr from GDAL.
> http://www.gdal.org/ogr/drv_kml.html
>
> HTH,
>
> --
> Olivier
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20101004/6fe5f68d/attachment.html>


More information about the postgis-users mailing list