I have two tables in a pg database. One with annotations/points and one with linestrings. I would like to export both of them to the same dxf file with ogr2ogr. Is it possible at all somehow? I have managed to export the lines based on this article. And the points as well based on this. I also checked the official gdal documentation but there are no examples for my problem.
The ogr2ogr commands:
ogr2ogr -f "DXF" dir\line_layer.dxf "PG:host=*** user=*** dbname=***" -sql "select the_geom from shcema.line_table"
ogr2ogr -f "DXF" dir\annot_layer.dxf "PG:host=*** user=*** dbname=***" -sql "select the_geom, ogr_style from shcema.annot_table"
The ogr_style column contains data like this: "LABEL(f:""Times New Roman"",s:12pt,t:Sz 5)"
So my question is: Is it somehow possible to export from these two different sources to the same dxf file? (I am using GDAL 3.0.4.)
Only one OGR layer can be used to create the output file (but many DXF layers can be created)
. You could combine lines and points into one layer in PostGIS but then you must add dummy OGR_STYLE field also for your line features.PEN(c:black)
to the ogr_stlye column for the lines. In the sql query i tried selecting everything/ only the geom/ the geom and the ogr_style/ the geom and the text but none of them worked as I hoped. Do you have any idea what am I missing?