[GRASS5] [bug #1798] (grass) v.in.dxf writes bad dig_att file for labels

Paul Kelly paul-grass at stjohnspoint.co.uk
Mon Apr 14 14:52:10 EDT 2003


On Mon, 14 Apr 2003, John Gillette wrote:

> > From: Paul Kelly
> > Subject: Re: [GRASS5] [bug #1798] (grass) v.in.dxf writes bad dig_att
> >
> > This change at the top of the label_box.c looks relevant:
> > ...
> > **  Modified by Benjamin Horner-Johnson 1998-OCT-01
> > **      changed label from int to char, allowed 1 character labels
> > ...
...
> I agree. I don't understand why it was changed since writing non-
> integer to the dig_att file is incorrect. Am I missing something?

I would guess before that it didn't support labels at all unless they were
numbers; just ignored them.

> I have something which appears to work.  I need more testing. I
> use G_init_cats, G_write_vector_cats, and G_set_cat.  I haven't
> looked at m.in.e00.  I will do that.
>
> I looked at a couple examples that use G_fopen_new to open the
> dig_att file and they use fprintf to write directly to it. Are

Yes that's exactly the impression I got of how to do it from glancing over
a few source files.

> you sure G_write_vector_cats creates the dig_att file?

(It creates the dig_cats)

> In conclusion, I did get something working.  When I get it more tested
> I will let you know exactly what I did and why and maybe you can double
> check me.

I have several dxf files that I could test it with so yes let me know and
if we don't fully integrate v.in.dxf3d into v.in.dxf at least I could
probably merge your fix into it so it writes to dig_cats.

Paul




More information about the grass-dev mailing list