Possible bug in v.in.dxf?

Susan Huse sue at ced.berkeley.edu
Mon Oct 25 14:12:28 EDT 1993

Date: Mon, 25 Oct 93 11:00:04 PDT
From: sue at ced.berkeley.edu (Susan Huse)
Message-Id: <9310251800.AA04641 at ced.berkeley.edu>
Sender: grass-lists-owner at moon.cecer.army.mil.
Reply-To: grassu-list at moon.cecer.army.mil.
Precedence: Bulk
To: ggjns at knuthmtsu.edu
Subject: Re: Possible bug in v.in.dxf?

> From: ggjns at knuth.mtsu.edu (John N. Schmidt)
> Subject: Possible bug in v.in.dxf?
> Hi there.  I have a data set that I have converted from my AGIS GIS
> program to a DXF formatted file.  The file consists of vectors which
> represent several hundred closed polygons.  The problem is that for the
> life of me I cannot get them imported into Grass via v.in.dxf as
> anything but lines, not as areas.
> In discussions with the people who wrote AGIS, they have checked and
> rechecked the DXF export program up and down and say that it conforms
> exactly to the DXF specification set out in the AutoCAD manuals.  In
> fact, I have imported these polygons into AutoCAD Release 11 and they
> too come out as closed polygons, complete with area values and the whole
> nine yards.  Exporting though from AutoCAD to its own DXF format file
> puts a whole lot more headers and defined values into the DXF file, but
> the results are the same when inputting into Grass 4.1, and running
> v.support.  Everything is still lines and nodes, but not areas.

What I would suggest is taking the GRASS vector file you have created and
exporting it to ascii (v.out.ascii).  Then going directly to the ascii
file and changing all "L"s to "A"s.  The format of the ascii file is
an L for lines and an A for areas, followed by the points that make up
the feature.  (lower case l's and a's are for deleted areas and lines).
If vi you can go a global replace of L with A.  (:g/L/s//A/g)
Then reimport the vector file (v.in.ascii).  

I have done this procedure many times (for different reasons) and
have never had a problem.

Good luck

-Sue Huse
UC Berkeley

More information about the grass-user mailing list