[gdal-dev] ogr2ogr gml driver writing blob fields

Attila Csipa plists at prometheus.org.yu
Fri May 30 05:06:46 EDT 2008


On Thursday 29 May 2008 21.41:55 Frank Warmerdam wrote:
> > in the table have a blob column (a small image representing the feature)
> > have that column written down in hex notation (not a problem) and
> > truncated at around 35 bytes (which is a problem). So, the question is if
> > there is a way to tell the GML driver not to truncate these fields ? I've
> > looked for some dsco/lco field magic in but without much luck... Any
> > recommendations ?
>
> There is no mechanism to convert these to GML without adjustments to the
> GML writer.  I imagine the driver is calling GetFieldAsString() which
> for blobs returns the truncated result you are seeing.  It is intended to
> give some human readable clues about the BLOB while not overwhelming the
> output in applications like ogrinfo.
>
> If we implemented specific binary field support in the GML driver this
> could be corrected.
>
> However, I'm not personally in a big rush to implement this feature.  I'm
> not sure if anyone would pick it up if you filed a ticket.

Looking at the code it seems the reserved size for unknown widths (like BLOB) 
is hardcoded. Maybe a new GML_MAX_COLSIZE_ON_UNKNOWN_WIDTH sort of DSCO/LCO 
parameter could be introduced until proper handling of binary data is 
resolved ? I'd appreciate a shorter but logical name instead of my halfliner. 
I'll check more thoroughly the relevant parts of GDAL, if it's not too 
complex I'm willing to get my hands dirty with this (hopefully it will 
require less time than to do a binary wrapper which I'd have to do if I can't 
get around this gdal feature).


More information about the gdal-dev mailing list