[Qgis-user] importing Text from dxf file
Siki Zoltan
siki at agt.bme.hu
Mon Jan 12 04:55:25 PST 2015
Dear Andreas,
a quick workaround to get text angle and height, I've written a gawk
script, which makes csv file from the TEXT entities in a DXF file.
CSV can be loaded to QGIS as delimited text layer.
Angle and height columns can be used in labelling.
Best Regards,
Zoltan
On Mon, 12 Jan 2015, Andreas Neumann wrote:
> Hi,
>
> There is certainly room for improvement regarding DXF. We first concentrated
> on the DXF export, which is in already quite good shape in QGIS master. Once
> this is done, we should invest in DXF reading as well.
>
> Until then, there are only workarounds, sorry.
>
> Andreas
>
> Am 2015-01-12 12:36, schrieb Siki Zoltan:
>> Dear Giacomo,
>>
>> yes, that is the way what you found. There is no text/annotation
>> support in most of the GIS formats (e.g. shape file, PostGIS,
>> SpatiaLite, etc.).
>> You can make a label from the Text column. What is not imported from
>> the DXF file are the angle, size and font of the text.
>>
>> Best regards,
>> Zoltan
>>
>> On Mon, 12 Jan 2015, Giacomo Minotti wrote:
>>
>>> Good morning,
>>> is it possible to import in qgis a dxf file that contains text?
>>> When I import the file, i see the text like point
>>> thanks
>>> Giacomo
>>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
BEGIN { entity = ""; last =""; i = 0;
printf "id;layer;x;y;angle;height;text\n";
}
/ENTITIES/,/EOF/ { if ($0 ~ "^ *0?$" && entity == "TEXT") {
i++;
printf "%d;\"%s\";%.3f;%.3f;%.4f;%.1f;\"%s\"\n", i, layer, x, y, angle, height, text;
entity = "";
}
if (last ~ "^ *0$") { entity = $1; }
if (last ~ "^ *1$") { text = $1; }
if (last ~ "^ *8$") { layer = $1; }
if (last ~ "^ *10$") { x = $1; }
if (last ~ "^ *20$") { y = $1; }
if (last ~ "^ *40$") { height = $1; }
if (last ~ "^ *50$") { angle = $1; }
last = $0;
}
More information about the Qgis-user
mailing list