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

Huidae Cho grass4u at gmail.com
Mon Mar 27 03:48:24 EST 2006


Actually, the current v.in.dxf is not a rewrite version, but a port from GRASS
5.x, so what I did is only to make it run with 6.x.  That being said, I didn't
have enough time to improve it.

On Mon, Mar 27, 2006 at 10:18:37AM +0200, Radim Blazek wrote:
> On 3/25/06, Huidae Cho <grass4u at gmail.com> wrote:
> > Hi,
> >
> > I've committed v.in.dxf in CVS and it now supports z coordinate import, which
> > means v.in.dxf3d is not required to build a 3d vector file.  The label import
> > feature in the previous version is not yet supported.
> 
>         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.

> 
> > Don't forget to run v.build after v.in.dxf.
> 
> I see Vect_build(layers[count].Map, stderr) in create_layers.c
> and that builds topology.

That's what I added after the first posting.

> 
> 
> 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.

Huidae Cho

> 
> 
> Radim
> 
> 
> > In addition, v.surf.idw can read in z values from a 3d
> > vector.
> >
> > Huidae Cho
> >
> >
> 




More information about the grass-dev mailing list