domingo, 11 de septiembre de 2011

Pasar Shapefiles a KML

Pasar Shapefiles a KML en Galicia con Software libre es muy fácil. No es necesario un shp2kml ni usar ningún SIG de escritorio.

Hay que tener GDAL/OGR instalado y ejecutar lo siguiente:

ogr2ogr -f "KML" -t_srs "epsg:900913" -s_srs "epsg:23029"  result.kml input.shp
Pero, si lanza el siguiente error:
ERROR 6: Unable to load PROJ.4 library (libproj.so), creation of OGRCoordinateTransformation failed.
Failed to create coordinate transformation between the following coordinate systems.  
This may be because they are not transformable, or 
because projection services (PROJ.4 DLL/.so) could not be loaded.
En mi caso era que tenía varios paquetes con PROJ, pero tuve que instalar:
 sudo apt-get install proj
Con esto ya pude transformar de forma masiva SHPs a KML.

No hay comentarios: