[GRASSLIST:1011] Re: help needed with importing dxf files and d.labels

Paul Kelly paul-grass at stjohnspoint.co.uk
Sun Aug 24 15:20:17 EDT 2003


Hello

Ambili Sudhi wrote:
> 
> hi everyone,
> 
> Plz help me out with this problem:
> 
> I have an dxf file created in autocad which has 3
> layers of drawings and 1 layer of text. Now when I
> import this dxf file into GRASS all the layers get
> imported however the when I try to display the text
> layer it does not show the text instead it shows plain
> boxes around where the text is supposed to be.

This is normal. v.in.dxf calculates where the text would be and draws a
box around it.

> 
> The command used to import is as follows:
> >v.in.dxf dxf=/home/gis/Test.dxf lines=0,1,2 labels=3
> prefix=Test
> 
> After importing when I run v.support for the text
> layer file I get the following error in the output:
> 
>     Reading Vector file 100%
>     Building areas 100%
>     Building islands (no islands present)
>     Attaching labels
> 
> Bad line 'L  15.945373 7.213136 ELLIPLSE
> '
> Bad line 'L  8.352338 13.325963 CIRCLE
> '
> Bad line 'L  4.482340 7.653259 RECT
> '

That is a known bug in v.in.dxf that might be fixed some time. You can
work around it using the Perl script in this message:

http://op.gfz-potsdam.de/GRASS-List/Archive/msg08556.html

As you have seen above v.support will delete your attribute labels
unless you run the above script first, so you will have to re-run
v.in.dxf. But that is described in the above link.

When all that is sorted out and your labels are in the dig_cats file,
d.vect.labels will be the command you want to show your text labels in
the monitor.

Paul




More information about the grass-user mailing list