[GRASSLIST:409] Re: [bug #2451] Re: [GRASS5] v.in.dxf

Hamish hamish_nospam at yahoo.com
Mon Mar 27 05:06:50 EST 2006


> is the latest GRASS CVS  has v.in.dxf.
> No more recompiling with source code.!!
> If answer is YES.. is great.

Yes. But note you probably will only be able to load older versions of
DXF (ie no newer than AutoCAD ver. 9 or 10). For anything newer you will
still need to use v.in.dwg or help the Free software world to reverse
engineer the propritary format.

To convert newer DXF to older DXF see the Lx-Viewer project:
  http://lx-viewer.sourceforge.net
but I see that uses "an ammended version of the GPL v2 so that we can
link to the OpenDWG libraries."  shrug.


note code to descramble AutoCAD 2004 DWG header info is here:
 http://www.opendesign.com/about/faq.htm#encrypted

copied here for educational purposes:
"The data starting at location 0x80 of the DWG file can be decrypted by
exclusive or'ing with the number sequence produced by the following
code:

OdUInt8* p = data.asArrayPtr();
OdUInt32 sz = 0x6c;
int randseed = 1;
while (sz--)
{
  randseed *= 0x343fd;
  randseed += 0x269ec3;
  *p++ = (OdUInt8)(randseed >> 0x10);
}

If you don't read C++, this code starts with 1, multiplies it by a
number, adds it to a number, bit-shifts it, saves 8-bits of the result,
and starts again. No, it's not a complex algorithm, but it's enough to
completely scramble a DWG file."

interesting.


see also:
  http://intevation.net/rt/webrt?serial_num=2451&display=History

labels:
 look for v.cadlabel in GRASS 5 and
http://grass.itc.it/pipermail/grassuser/1994-April/020692.html
  * note labels now do rotation, maybe the time has come?


> Similarly for E00 imports when will they be part of GRASS CVS ??

v.in.e00 is already installed by default. To use you just need to
install avcE00 and E00Compr from  http://avce00.maptools.org/avce00/

Debian pakages for both are now in Debian testing and unstable
thanks to Paul Wise and the DebianGIS team.

The situation is no different than needing GDAL to import GDAL/OGR
formats. IIRC, no one has funded E00 support in GDAL/OGR yet, so it
hasn't happened there. Hence the extra dependancy.



Hamish




More information about the grass-user mailing list