Hi Verena, can you provide more information. What software version did you use (gdal, postgis). What kind of geometries is in the database. psql -d mydb -c "SELECT DISTINCT GeometryType( geom_column ) FROM my_data"
What happend if you select only one geometrytype from database. ogr2ogr -f "DXF" -sql "SELECT * FROM my_data WHERE GeometryType( geom_column ) = 'POLYGON'" my_data.dxf PG:'host=localhost password=xxx user=xxx dbname=MYDB' Gr Ralf On Donnerstag 26 Januar 2012 16:56:48 Verena Diewald wrote: > Hi Darren, > > > I tried that option, but the error still remains. > Does anyone have another idea? > > > Greetings, > > Verena > > Am 26.01.2012 16:00, schrieb Carman, Darren: > > Try adding -nlt POLYGON (also has POINT and LINESTRING options). > > > > We have this option on an older version that used the ODA libraries > > directly, so can't guarantee it's still the same. > > > > Darren > > > > *From:*gdal-dev-boun...@lists.osgeo.org > > [mailto:gdal-dev-boun...@lists.osgeo.org] *On Behalf Of *Verena Diewald > > *Sent:* 26 January 2012 14:03 > > *To:* gdal-dev@lists.osgeo.org > > *Subject:* [gdal-dev] Creating DXF with ogr2ogr > > > > Hi all, > > > > I'm trying to create DXF files from a PostgreSQL database using ogr2ogr: > > |ogr2ogr -nln my_data -a_srs EPSG:25832 -s_srs EPSG:25832 -t_srs > > |EPSG:25832 -f "DXF" my_data.dxf PG:'host=localhost password=xxx > > |user=xxx dbname=MYDB' -sql "SELECT * FROM my_data"| > > > > It works fine with point data, but I get an invalid dxf file for > > polygon data. Opening the polygon dxf file results in the following > > error: > > > > The following error was encountered while reading > > in HATCH starting at line 1546: > > Error: expected group code 10 > > Invalid or incomplete DXF input -- drawing discarded. > > > > > > > > Do I have to pass any more options to ogr2ogr when creating a polygon > > dxf? What did I do wrong? > > Does anyone have an idea about that? > > > > Greetings, > > > > Verena > > > > > > > > > > > > > > > > > > > > > > Infoterra Ltd. Is part of the Astrium GEO-Information Services > > Division and a wholly owned subsidiary of Astrium, Europe's leading > > space systems and services specialist. > > > > Disclaimer. The information contained in this e-mail and its > > attachments are confidential and intended only for the use of the > > named addressee(s). If you are not the intended addressee, please do > > not read, copy, use or disclose this message or its attachments. If > > you have received this message in error, please notify the sender > > immediately and delete or destroy all copies of this message and > > attachments in all media. Any views or opinions expressed are solely > > those of the author and do not necessarily represent those of > > Infoterra Ltd and shall not form part of any binding agreement. > > > > Infoterra Limited a company registered in England under number 2359955 > > and having its registered office at Atlas House, 41 Wembley Road, > > Leicester, LE3 1UT. VAT number GB 476 0468 27. > > > > P Before printing, think about the environment
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev