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

Huidae Cho grass4u at gmail.com
Mon Mar 27 14:31:27 EST 2006


On Mon, Mar 27, 2006 at 12:26:58PM +0200, Radim Blazek wrote:
> 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
> 

Done in CVS except for layer selection. BTW, why does "d.vect layer=" display
ALL layers? I had to add cats=1-9999999 to see what's in a given layer. Is this
a feature?

d.vect map=mymap layer=4		 # is the same as d.vect map=mymap
d.vect map=mymap layer=4 cats=1-99999999 # displays the layer 4

Huidae Cho




More information about the grass-dev mailing list