I'm starting to mess around with some of the GDAL toolsets, specifically the ogr2ogr.
I'm working with converting a 2000 ACSII DXF file to shapefiles depending on geometry.
Everything seems to work fine, but I'm not getting the complete feature.
Here's an example of my command:
ogr2ogr -where "OGR_GEOMETRY='LINESTRING' AND LAYER='E-TRANSFORMER'" -f "ESRI Shapefile" transformers.shp System_Map.dxf
Now this does create a polyline shapefile with a good amount of data, but I'm losing a key part I need, here's an example of what I need:
The problem is that the conversion is only giving me the line up to the circle.
Each pie of the circle is its own feature and the line is its own feature. So in this picture there are 4 separate features, but they are all part of the E-TRANSFORMER layer.
Can you think of a reason I am only getting the line leading up to the circle and not the circle too?
FME converts it fine, but I'd rather use GDAL if I could.
Thanks for any help.
Best Answer
It appears your geometry is unknown to ogr. It doesn't see your geometries as one type and reports:
Remove your geometry restriction: OGR_GEOMETRY='LINESTRING' and specify -skipfailures. There appear to be points in the layer that need to be discarded:
It worked for me in QGIS, at least I got the linestring and the pie.