[GRASS5] v.in.dxf

Malcolm Blue mblue at nb.sympatico.ca
Fri Feb 15 19:05:32 EST 2002

The sample DXF file has POLYLINE data in BLOCK definition.  In the ENTITIES
section the BLOCK insertion point is defined.

This is quite common in the AutoCAD world and should be supported by GRASS.


> -----Original Message-----
> From: grass5-admin at grass.itc.it [mailto:grass5-admin at grass.itc.it]On
> Behalf Of Roger Miller
> Sent: Friday, February 15, 2002 7:39 PM
> To: grass5 at grass.itc.it
> Subject: [GRASS5] v.in.dxf
> Folks,
> I followed up on Heiko's problem importing the sample dxf from
> english-nature.org.uk.  I think I found the problem, but I'm not sure I
> found the solution.
> Polyline data in a dxf file are supposed to be included in an ENTITIES
> section.  v.in.dxf reads some header data then searches for the ENTITIES
> section before it starts translating data.  If v.in.dxf doesn't find an
> ENTITIES section then it prints a message.  v.in.dxf should probably stop
> at that point, but it doesn't.
> The sample file that Heiko tried to import contained polyline data
> outside of an ENTITIES section.  There was an ENTITIES section, but it
> was at the end of the file after the polyline data.  v.in.dxf skipped
> allmost all of the file while searching for the ENTITIES section, then
> interpreted the small part of the data that followed.  There was no line
> data in that part of the file, so v.in.dxf quit without importing
> anything and without giving any indication of a problem.
> That would seem to be a very badly build dxf file, and perhaps it is
> reasonable for v.in.dxf to fail to import that file.  However, both
> StarOffice and Surfer 6 imported the same file without problems.  At the
> very least if v.in.dxf fails to import the file then it needs to deliver
> some message to the effect of "vector data not found."
> My simple solution to the problem was to stop v.in.dxf from searching for
> the ENTITIES section.  That is done just by commenting the call to
> dxf_entities in find_lines.c.  With that change v.in.dxf tries to
> interpret everything that follows the header section.  That allows
> v.in.dxf to import the sample dxf file and I don't see that it causes any
> general problems. However, it might have other side effects that I don't
> understand.  Would someone else like to look at the code?
> Roger Miller
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5

More information about the grass-dev mailing list