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

2012-06-27 Thread Mac Wind
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 ope

[gdal-dev] “AttributeError: getZ” error when trying to get the elevation of DXF linestrings

2012-06-24 Thread Mac Wind
Hello. I'm using Python and OGR to extract the elevation of lines within a DXF file. -- import ogr driver = ogr.GetDriverByName('DXF') datasource = driver.Open('test1.dxf', 0) layers=datasource.ExecuteSQL( "SELECT DISTINCT Layer FROM entities" ) layer=datasource.GetLayerByIndex(0)

[gdal-dev] DXF files: Is it possible to handle layer names? (I get only “entities”)

2012-06-23 Thread Mac Wind
I'm using Python to extract the layers of a DXF file and convert them into SHP. I began with: import ogr, os, sys driver = ogr.GetDriverByName('DXF') datasource = driver.Open('test1.dxf', 0) numberLayers = datasource.GetLayerCount() for i in range(0, numberLayers): la