[gdal-dev] ogr2ogr ignores LINEFORMAT=LF?

Stefan Keller sfkeller at gmail.com
Sat Jan 5 07:44:27 EST 2008


Frank,

You're right, I meant CRLF not LF (under Linux, fo Windows). I have tried to
correct it but got another delivery error (550 5.1.1 User unknown). It
finally worked with a parameter -lco like this:

  ogr2ogr -f CSV out Bahnhoefe.shp -sql "select *,OGR_GEOM_WKT from
Bahnhoefe" -lco "LINEFORMAT=LF"

I actually thought that -dsco would serve as a defailt for all layers (-lco)
because I don't bother too much about layer names..

-- Stefan

2008/1/4, Frank Warmerdam <warmerdam at pobox.com>:
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080105/8513edb6/attachment.html


More information about the gdal-dev mailing list