[gdal-dev] Can we combine all layers of kml into single GeoJSON

Manikanta Kondeti mani.iiit123 at gmail.com
Thu Feb 5 04:25:21 PST 2015


Yeah that ll be pretty awesome :D

On Thu, Feb 5, 2015 at 4:49 PM, Jukka Rahkonen <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> Even Rouault <even.rouault <at> spatialys.com> writes:
>
>
>
> > Mani,
> >
> > you could use a VRT union layer to merge all layers into a single one.
> This is
> > documented at http://gdal.org/drv_vrt.html
> >
> > In your case this would be creating a .vrt file like :
> >
> > <OGRVRTDataSource>
> >     <OGRVRTUnionLayer name="unionLayer">
> >         <OGRVRTLayer name="source1">
> >             <SrcDataSource>source.kml</SrcDataSource>
> >             <SrcLayer>name_of_first_kml_layer</SrcLayer>
> >         </OGRVRTLayer>
> >         <OGRVRTLayer name="source2">
> >             <SrcDataSource>source.kml</SrcDataSource>
> >             <SrcLayer>name_of_second_kml_layer</SrcLayer>
> >         </OGRVRTLayer>
> >     </OGRVRTUnionLayer>
> > </OGRVRTDataSource>
> >
> > and then use ogr2ogr to convert this .vrt into geojson.
>
> Hi,
>
> Just thinking, but wouldn't it be nice to have "ogrbuildvrt" tool that
> would
> take list of OGR supported layers and outputs a simple vrt with one  union
> layer like the one in your example?
>
> -Jukka Rahkonen-
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150205/83620b31/attachment-0001.html>


More information about the gdal-dev mailing list