I really need to export, by the ogr2ogr command or similar, text information related to a geometry position from my PostgreSQL(with PostGIS) database to an AutoCAD DXF layer file or to a Microstation DGN layer file, so I can later show that information in the AutoCAD/Microstation GIS.
I have been looking through internet for so many days but all I can get is a layer with geometry points, I always lose the text label information. I know there is the "Text" element type in DGN and the "MTEXT/TEXT" element type in DXF, so I need to generate that kind of features.
In Shapefiles I know that I can export new attribute fields with that information but it have to be obtained in DXF/DGN format.
I need to made it automatic with some kind of server command like GDAL ogr2ogr, but I have tried with the "-select" (getting the text SQL SELECT attribute) or "-lco" or "-dsco" options without any result...
Those are my commands:
ogr2ogr -select "Text" -f DXF text_layer.dxf "PG:host=192.168.1.* user=**** password=**** dbname=****" -sql "SELECT position AS the_geom, name as Text FROM the_geometry_table" ogr2ogr -select "Text" -f DGN text_layer.dgn "PG:host=192.168.1.* user=**** password=**** dbname=****" -sql "SELECT position AS the_geom, name as Text FROM the_geometry_table"
Any help? Thank you very much:)