[gdal-dev] Errors with ogr2ogr and DXF files (ASCII and BIN)

Even Rouault even.rouault at mines-paris.org
Wed Jun 27 07:10:04 PDT 2012


Selon Mac Wind <macwind2 at gmail.com>:

> Hi.
>
> Using OGR, I'm trying to reproject a DXF file. I'm using ogr2ogr, but
> I get two type of errors depending if I start with a BIN DXF or an
> ASCII DXF file.
>
> With BIN DXF:
>
> ogr2ogr -s_srs 27492.prj -t_srs 4326.prj myfile_WGS84.dxf myfile_BIN12.dxf
>
> I get this error message:
>
> FAILURE:
> Unable to open datasource `myfile_BIN12.dxf' with the following drivers.
> [+ the list of installed drivers, included DXF]

Binary DXF is not supported.

>
> With ASCII DXF
>
> ogr2ogr -s_srs 27492.prj -t_srs 4326.prj myfile_WGS84.dxf myfile_ASCII12.dxf
>
> I get this error message:
>
> FAILED: Layer entities already exists, and -append not specified.
>         Consider using -append, or -overwrite.
> ERROR 1: Terminating translation prematurely after failed
> translation of layer entities (use -skipfailures to skip errors)
>
> (effectively, 'entities' does exist, but this the expected situation, right?)
>

You must explicitely specify the output driver with -f DXF (otherwise
And you must delete myfile_WGS84.dxf if it exists before.





More information about the gdal-dev mailing list