Opened 13 years ago
Closed 13 years ago
#3334 closed defect (invalid)
DXF creation failed.
|Reported by:||lucien||Owned by:||warmerdam|
Trying to convert a shapefile to a DXF using the following command on Windows: ogr2ogr.exe -f "DXF" fluss_poly_combioula2.dxf fluss_poly_combioula.shp won’t work. It log the following message :
- ERROR 4: Failed to open template header file ' ' for reading.
- ERROR 4: Failed to open template trailer file ' ' for reading.
- DXF driver failed to create fluss_poly_combioula2.dxf
In my code NULL is returned when calling the CreateDataSource function:
m_DataSource = pDriver->CreateDataSource(myHomeMadePath, NULL);
The strange part is that similar code is perfectly working on Mac. It seems that OGR isn’t able to found header.dxf and footer.dxf although they are both in the DATA folder.
I’m using the latest trunk (18570) either on Mac and Windows.
Change History (1)
comment:1 by , 13 years ago
|Status:||new → closed|
Hmm, I'm not thrilled with how the error is reported so I've made some changes in trunk (r18578). The report should now be more like:
But I believe your problem is that the GDAL data directory is not being found. On windows there is essentially no regular install location so you pretty much have to set the GDAL_DATA environment variable to tell GDAL where to find it's data files.
If you are convinced you have GDAL_DATA set properly and the issue is deeper feel free to reopen the ticket.