[Qgis-user] PostGIS to DXF

Andreas Neumann a.neumann at carto.net
Thu Jun 9 09:32:05 PDT 2016


Hi Richard,

QGIS 2.15 is now in bug fixing mode (until July 8). I would be very 
interested to get such fixes into the next QGIS version - if it is a 
bug. Labels should export fine with option b) (native export). If not, 
it is a bug and should be fixed.

But we need a bug report and a small sample data set. Perhaps you can 
reproduce the issue with a subset of the data, or even with another data 
format.

There have been a few fixes in master (and 2.14) around rule-based 
labeling. So it might be good to check master or the latest 2.14x 
version. If you report the bug, please assign it to Jürgen Fischer - he 
is the DXF expert.

Thanks,
Andreas

On 09.06.2016 18:17, Richard McDonnell wrote:
> Thanks,
> I had tried both initially, with little success, the initial data was 
> DGN, I used an ETL to extract the line and text geometry, the text 
> coming in as points.
> I styled the text using the attributes extracted like text height and 
> rotation and all looks and works well within QGIS.
> When I use the Export to DXF tool (option B), I get all the 
> Linestrings perfect, but I get styled points (based on the attributes) 
> instead of Text.
> I have added the extra column to one of the Tables, and will try the 
> OGR export (option A) tomorrow with that.
> It is no big deal to add the column to the dataset, it can be added as 
> part of the ETL, If I get it all to work.
> I can submit a bug report, but as for the sample data, It is a 
> sensitive dataset, so I cant send that.
> It may also be the version of QGIS im using, not being the most up to 
> date 2.14.2-Essen
> I will continue with it tomorrow, if I find a solution, I will post it.
> Regards,
>
>
>
> On 09/06/2016 17:03, Andreas Neumann wrote:
>> Hi Richard,
>>
>> How did you export your DXF?
>>
>> There are two options:
>> a) Save AS (through OGR)
>> b) Menu Project --> Export DXF which is a native QGIS DXF export not 
>> using OGR.
>>
>> Option b) is much more powerful and should export your label fine - 
>> not with all details - as QGIS labels are more powerful than DXF 
>> labels, but basic stuff, such as font-family, font-size, multi-line 
>> labels, etc. should be exported fine.
>>
>> If not, please submit a bug report with some sample data.
>>
>> Option a) is what was discussed here, but is much more complicated - 
>> you would have to create separate columns with feature styles first.
>>
>> Andreas
>>
>> On 09.06.2016 17:08, Richard McDonnell wrote:
>>> I am back again,
>>> Using what you said as a guide, I added a column to the table using 
>>> the following
>>>
>>> ALTER TABLE mv_lv_network_point
>>> ADD COLUMN OGR_STYLE CHARACTER VARYING(80);
>>> UPDATE mv_lv_network_point
>>> SET OGR_STYLE = 
>>> 'LABEL(f:"Arial",s:{igds_text_size},a:{igds_rotation},t:{igds_text_string})' 
>>> ;
>>>
>>> s:{igds_text_size} Referencing Text size column
>>> a:{igds_rotation} Referencing Rotation Column
>>> t:{igds_text_string}  Referencing Text String Column,
>>>
>>> I then used the DXF Export tool, with no success.
>>> What have I done wrong? Should I be doing this as an OGR2OGR 
>>> exercise as opposed to using the Export tool?
>>> Regards,
>>>
>>> Richard.
>>>
>>>
>>>
>>>
>>> On 09/06/2016 13:10, Heikki Vesanto wrote:
>>>> With ogr2org (which QGIS uses for import/export), when writing a DXF
>>>> file, if you have an input point geometry, which has an OGR_STYLE
>>>> attribute, it will be written as a text geometry when opened in CAD.
>>>>
>>>> This will work straight from a database as well. But there is a guide
>>>> that uses gml at:
>>>>
>>>> http://gisforthought.com/gis-to-cad-using-ogr2ogr-part-3-point-annotation-to-text-in-cad/
>>>>
>>>> On Thu, Jun 9, 2016 at 12:30 PM, Richard McDonnell
>>>> <richard.mcdonnell at opw.ie>  wrote:
>>>>> Afternoon all,
>>>>> I would firstly like to say that the DXF Export option is great, and is a
>>>>> great addition to QGIS.
>>>>> I do have one problem though which you you may be able to help with.
>>>>> I have a PostGIS database LineStrings and Points (Text)
>>>>> What I would like to do is have the text export also, all I get when I
>>>>> export the points is....Points, no text.
>>>>> I would appreciate any help, I am tying to get a Map out at the moment and
>>>>> would have a preference to output it via QGIS.
>>>>> Regards,
>>>>>
>>>>> Richard.
>>>>>
>>>>>
>>>>>
>>>>> OPW - Ag féachaint don am atá le teacht - Ag caomhnú ón am atá thart
>>>>> OPW - Looking to the future - Caring for the past
>>>>>
>>>>> ***********************************************************
>>>>> Email Disclaimer:http://www.opw.ie/en/disclaimer/
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Qgis-user mailing list
>>>>> Qgis-user at lists.osgeo.org
>>>>> List info:http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>>> Unsubscribe:http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>>> -- 
>>> *_Richard McDonnell_*
>>> *GIS Specialist PgD GIS AssocSCSI*
>>> *OPW FRM Data Management*
>>> *52 Stephens Green, Dublin 2.*
>>> TEL: 01 6476543
>>>
>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user at lists.osgeo.org
>>> List info:http://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe:http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info:http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe:http://lists.osgeo.org/mailman/listinfo/qgis-user
>
> -- 
> *_Richard McDonnell_*
> *GIS Specialist PgD GIS AssocSCSI*
> *OPW FRM Data Management*
> *52 Stephens Green, Dublin 2.*
> TEL: 01 6476543
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160609/557cf918/attachment.html>


More information about the Qgis-user mailing list