[gdal-dev] OGR VRT Schema Support

Alexandre Gacon alexandre.gacon+gdal at gmail.com
Fri Oct 30 05:59:31 EDT 2009


Hi Franck,

Does the field definitions will replace the need to define a csvt file for
defining the types of a CSV file read with the VRT format to get
geographical coordinates ?

Best regards,

Alexandre Gacon

On Fri, Oct 30, 2009 at 9:18 AM, Frank Warmerdam <warmerdam at pobox.com>wrote:

> Folks,
>
> I have done a bit of work around OGR recently to make it easier to manage
> schemas for layers as VRT files.  For a project I wanted to be able to
> have a VRT file which would define a set of layers with geometry types,
> coordinate systems, fields and related information that I could use
> with ogr2ogr or similar utilities to create all the layers.
>
> To that end I have:
>
>  o Extended the VRT driver to support <Field> definitions giving all
>   the details of an attribute field on a layer (type, width, name,
> precision
>   and the source field it comes from in the source layer).
>
>  o Written an ogr2vrt.py script that will create a VRT corresponding to a
>   source datasource.  This is the ogr equivelent to what we could do with
>   gdal_translate -of VRT in.tif out.vrt but for feature datasources.  The
>   script currently lives in gdal/swig/python/samples but I may promote it
>   to the scripts directory implying it is supported if it is deemed to be
>   useful.
>
>  o Modified the VRT driver so that if the datasource name is @dummy@ it
> will
>   not go looking for an external file - it just creates a dummy memory
>   datasource and layer.  This effectively turns the .vrt into a schema
>   definition since there will be no effort to go looking for features on
>   the layers.  The -schema switch to ogr2vrt.py will create a VRT setup
>   this way.
>
> Let me know if there are any questions or interest in this capability.
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam<http://pobox.com/%7Ewarmerdam>
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Alexandre Gacon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091030/f4825690/attachment.html


More information about the gdal-dev mailing list