[GRASS5] Re: [GRASSLIST:373] v.in.dxf

Radim Blazek radim.blazek at gmail.com
Mon Mar 27 05:26:58 EST 2006


On 3/27/06, Huidae Cho <grass4u at gmail.com> wrote:
> >         fclose(layers[count].Map->dig_fp.file);
> >         layers[count].Map->dig_fp.file =
> >             G_fopen_modify(buf, GRASS_VECT_COOR_ELEMENT);
> >
> > What was the intention?
> > BTW, vector structure members should never be accessed directly
> > in modules, use Vect_ functions.
>
> According to the comment, the original version opened layers with
> G_fopen_append() and needed to open it again with G_fopen_modify() to add head
> info.

I recommend to remove that.

> > It seems that you import each DXF layer as separate vector map?
> > I think that it would be better to import everything in one map
> > with more layers. You can assign layer to each line with cat.
> >
> >    Vect_cat_set (Cats, layer_number, category );
> >
> > Note that DWG/DXF files usually contain many layers, it is realy impractical
> > to import a single DXF as 60 GRASS maps.
> > It would also simplify the v.in.dxf code as you don't need to handle many
> > vector maps.
>
> I agree with you on that.  The module should import all layers automatically
> regardless of whether or not users know the names of the layers that they want.
> Selecting specific layers should be an option, not a default behaviour.

It should be done before stable release (6.2.0).

Radim




More information about the grass-dev mailing list