[OSGeo Africa] Batch conversion from shp to kml

Zibusiso Ncube ncubezedm at gmail.com
Mon Aug 15 05:12:08 PDT 2016


I would just do a complete stand alone python scriptinyana

iterate through all the shapefiles gets their pathnames into a  list and
then create the output files pathnames for each file as i am about to put
it into an ogr2ogr conversion for shapefile to kml. then convert it.

maybe something like ...

def shpToKML(inputPath,outputPath):

#get the drivers
driver = ogr.GetDriverByName('KML')
driver = ogr.GetDriverByName('SHP')

#do the conversion
ogr2ogr.main(['-f', 'KML', outputPath,inputPath])

play around with it you will get it ...just check the specific ogr2ogr
syntax

Regards,

Zibusiso

Regards

Zibusiso M Ncube


On Mon, Aug 15, 2016 at 1:04 PM, Mnqweno Mnyengeza <mnqwenom at statssa.gov.za>
wrote:

> Dear All
>
> I need to convert approximately thirteen million  points from shp2kml
> using QGIS. I have already split the points into their respective
> provinces, districts and the lowest level of demarcation which is an
> enumeration area (EA) here at Statistics South Africa. The output file of
> the split is the sub-folder named the EA reference number and containing
> the points and polygon of that particular EA. I now need to batch process
> this conversion using QGIS batch file processor if any is available or any
> other free open source tool that can easily serve the purpose.
>
> Please assist
>
>
> Kind regards
>
> Mnqweno Mnyengeza (Mr)
>
> Professional GIS Practitioner
> Geography
> 082 9048267 (Mobile)
> Statistics South Africa
> "..*.people are very quick to notice the change in your attitude towards
> them but always ignore their unacceptable behavior that led to your change*
> ....."
>
>
>
>
> _______________________________________________
> Africa mailing list
> Africa at lists.osgeo.org
> You can UNSUBSCRIBE at http://lists.osgeo.org/mailman/listinfo/africa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20160815/84940afe/attachment.html>


More information about the Africa mailing list