[gdal-dev] ogr2ogr ignores LINEFORMAT=LF?

Frank Warmerdam warmerdam at pobox.com
Thu Jan 3 22:04:21 EST 2008


Stefan Keller wrote:
> (Sorry for double postings, I'm getting 550 5.1.1 User unknown errors),
>  
> Dear all
> 
> This works but it ignores LINEFORMAT=LF: The resulting file always 
> contains LF. What am I doing wrong?
> 
> $ ogr2ogr -f CSV out MyShape.shp -sql "select *,OGR_GOM_WKT from 
> MyShape" -dsco LINEFORMAT=LF
> 
> (I'm using Windows XP with GDAL 1.5.0b1, FWTools 2.0.2, released 2007/12/05)

Stefan,

You wrote that ogr2ogr ignores LINEFORMAT=LF and always products files
with line feeds.  Perhaps you mean that it always produces CRLF?

Looking in the code I see LINEFORMAT is a layer creation option, not a
datasource creation option.  So it should be specified with -lco instead
of -dsco.  Perhaps that is the root of your problem?  I have made an effort
to clarify this in the documentation.

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
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list