Opened 10 years ago
Closed 9 years ago
#5596 closed defect (invalid)
Unable to export Labels from postgis to dxf with ogr2ogr
Reported by: | skalla | Owned by: | warmerdam |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | Utilities | Version: | unspecified |
Severity: | critical | Keywords: | |
Cc: |
Description
How would I convert postgis data to DXF with ogr2ogr (including label). I am unable to export the label, just the feature. Example would be appreciated.
What I tried was: ogr2ogr -t_srs "EPSG:4326" -s_srs "EPSG:4326" -f "DXF" "test.dxf" PG:"host=localhost port=5432 user={pguser} dbname={dbname} password={pgpassw}" -sql "SELECT 'LABEL(f:\"Arial\",s:1.5g,t:\"SOMETHING\")' AS OGR_STYLE, the_geom FROM atr_ervenlines" -lco GEOMETRY_NAME=the_geom
Note:
See TracTickets
for help on using tickets.
Documentation without examples is rather useless indeed, I had to spend more than an hour before I managed to get some good output even I do have more experience than average GDAL users.
The important points: 1) Output layer must be a point layer 2) Label must be found from the input data from field named "OGR_STYLE" 3) Do not care about "ERROR 1"
Test the result:
Closing this ticket as invalid. Feel free to create a new ticket about improving the documentation of the DXF driver. We will thank you very much if you'll attach good, tested examples to the ticket. You can also write something to the wiki.