Hi again, I am wondering if most of my issues are a result of wrong parameters in my ogr2ogr command:
Here is my command: ogr2ogr -select '' -f DXF test_ogr.dxf -dsco header=header_export_werkplan_abwasser.dxf -spat 695700 245900 696000 246100 PG:"dbname='uster' host='servername' port='5432' user='read' password='reader' schemas=abwasser tables=abwasser.export_dxf_geo405(the_geom)" So maybe the -select '' causers ogr to not read the attribute values and thus it cannot see layer, blockname, etc.? That's probably the case. If I use ogr2ogr -f DXF test_ogr.dxf -dsco header=header_export_werkplan_abwasser.dxf -spat 695700 245900 696000 246100 PG:"dbname='uster' host='servername' port='5432' user='read' password='reader' schemas=abwasser tables=abwasser.export_dxf_geo405(the_geom)" note - without the -select '' I receive error messages: ERROR 1: DXF layer does not support arbitrary field creation, field 'blockscale' not created. ERROR 1: DXF layer does not support arbitrary field creation, field 'blockangle' not created. ERROR 1: DXF layer does not support arbitrary field creation, field 'layer_geo405' not created. ERROR 1: DXF layer does not support arbitrary field creation, field 'ogr_style' not created. ERROR 1: DXF layer does not support arbitrary field creation, field 'gid' not created. ERROR 1: DXF layer does not support arbitrary field creation, field 'blockname' not created. I still get an output dxf - but as soon as I open it in autocad, Autocad crashes with a fatal error. FME can't read the resulting file either. Andreas On Wed, November 3, 2010 11:53 pm, Frank Warmerdam wrote: > On Mon, Nov 1, 2010 at 6:52 AM, Andreas Neumann <a.neum...@carto.net> > wrote: >> While testing the writer I wanted to use the new feature of specifying a >> column in the source dataset that contains the layer name a feature >> should >> end up in the destination dxf file. >> >> My source is a Postgis table, and the layer name is stored in a column >> called "layer". >> >> I don't know the correct dataset creation option (dsco) or layer >> creation >> option (lco) to specify the column containing the layernames. >> >> I tried: >> >> -dsco LayerName=layer >> -dsco layer=layer >> -lco LayerName=layer >> -lco layer=layer >> >> But no matter which of the above options I try, all my features end up >> in >> layer "0". >> >> If anyone has a hint how I could issue the ogr2ogr command so I can >> specify the layer a feature should end up in, it would be much >> appreciated! > > Andreas, > > Currently the dxf writer only looks for the attribute named Layer > to identify the layer name. It sounds like in your case it should > work directly since the Postgres column name is also "layer". > > If it is not, please file a ticket and I'll dig into it. Providing > an input dataset to demonstrate the problem would be > helpful. > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, > warmer...@pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > -- Andreas Neumann http://www.carto.net/neumann/ http://www.svgopen.org/ _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev