[GRASS5] v.in,dxf

David D Gray ddgray at armadce.demon.co.uk
Fri May 18 14:52:02 EDT 2001


"Roger S. Miller" wrote:
> 
> Rich Shepard wrote:
> 
> >   v.in.dxf almost works. Let me clarify that: it may actually be working now
> > that I've built a new installation. I'll check that over the weekend.
> 
> Rich, have you been working on the code?  The version that was packed with
> beta11 doesn't handle splines and that's really the only major problem I
> had when I tried to import a DXF from ACAD/2k.
> 
> Markus, I took a quick look at the CVS release and from the comments it
> doesn't appear that work is underway to add new capabilities.  Mostly a
> much-needed clean-up.
> 
> I recently needed to import a ACAD/2K dxf and nothing I had access to
> would swallow it (including my apparently aging version of AC Lite).  I've
> been writing my own programs to read, process and write DXF for several
> years, so I just adapted one of those programs to read splines and write
> the equivalent lines.
> 
> I'm willing to give my spline routine to someone who might incorporate it
> into v.in.dxf.  My program works, but it isn't full featured and it is
> just a simple cubic b-spline, so might not even be the right kind of
> spline. The DXF files contain several codes that I don't interpret to
> produce the lines.
> 
> In the course of doing that I found a GPLed C++ class library called DIME
> (Dxf Import Manipulation and Export).  I decided that it would probably be
> better to incorporate DIME in any future coding I have to do rather than
> continue my hacking, but I didn't do it right away because I didn't want
> to move to C++.  I haven't used DIME at all, yet.
> 
> Has anyone thought much about incorporate DIME into v.in.dxf/v.out.dxf ?
> 
> >   The potential problem with v.out.dxf is for which version of AutoCAD it
> > should be targeted. Apparently ACAD/2K is quite different from earlier
> > versions.
> 
> As far as I know, the main version difference that would effect v.out.dxf
> is the difference between the old-style POLYLINE and the new-style
> LWPOLYLINE used in ACAD/R14 and later.  LWPOLYLINE would be a better
> choice, as it's simpler, but the old POLYLINE format is the only one
> that's sure to work with old software.
> 
> There are also revisions to the dxf header, so that my old AC lite program
> won't even read through the header from the new 2k dxf.  AC Lite was the
> only app I had that reported a problem with the header.
> 
> David, is the problem of importing a dxf substantially different from
> importing a shapefile?  Even with the generic vector import capability,
> won't there still be a place for something like DIME to handle the dxf
> format?
> 

No, it's substantially similar. But this is the reason why we should
separate out the two phases of the import - so that we don't have to
duplicate effort. The other advantage is that we can utilise suitable
3rd party libraries to handle their respective formats. Which is the
gist of what you are saying I think.

David


> Roger Miller
> 
> _______________________________________________
> grass5 mailing list
> grass5 at geog.uni-hannover.de
> http://www.geog.uni-hannover.de/mailman/listinfo/grass5



More information about the grass-dev mailing list