Details Ticket 1950


Comment | Reply | Take | Open


Serial Number 1950
Subject v.in.dxf occasionally fails to read LINE and other entities
Area bug
Queue grass
Requestors dheth@ualberta.ca
Owner none
Status resolved
Last User Contact Mon Feb 5 21:53:26 2007 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Mon Feb 5 21:53:26 2007 (2 yr ago)
Created Tue Jun 17 20:33:55 2003 (5 yr ago)

Transaction History Ticket 1950


Tue, Jun 17 2003 20:33:55    Request created by guest  
Subject: v.in.dxf occasionally fails to read LINE and other entities

Platform: other
grass obtained from: Other (CDROM etc)
grass binary for platform: Compiled from Sources
GRASS Version: 5.0.0

It has been reported that the program to convert dxf files into GRASS vector
files (v.in.dxf) will sometimes fail to process AutoCAD entities (e.g., see mail
at http://op.gfz-potsdam.de/GRASS-List/Archive/msg08563.html).

I have encountered similar difficulties, although on other occasions v.in.dxf
seems to work as specified.  The latest failure occurred on a file exported into
dxf format by an Intergraph CAD application.

Examining the source code for v.in.dxf/find_lines.c (I encountered this problem
with GRASS 5.0.0, but the source code for 5.0.2 is the same), I noted that find_lines.c
expects all LINE and similar entities to be contained within the ENTITIES section
of a dxf file.  However, the dxf format allows entities to appear within the
BLOCKS section as well (cf.: www.relief.hu/h_dxf12.html).  Any lines defined
outside the ENTITIES section will apparently be missed.

I've tried one workaround by defining a string like 

GLOBAL_DXF      char    blox[8];

in dxf2vect.h and initializing it in init_chars.c as

strcpy (blox, "BLOCKS");

Then, I've rewritten line 8 of entities.c to read

while ((strcmp (dxf_line, entitie) != 0) && (strcmp (dxf_line, blox) != 0))
This allows find_lines.c to read entities after the BLOCKS section begins.

This is probably not the best way to deal with the conversion, but I hope the
description is helpful.  I think v.in.dxf is a very valuable module, since many
cadastral spatial databases are produced on CAD systems.

Regards,

Don Heth, Professor
Department of Psychlogy
University of Alberta

Mon, Feb 5 2007 21:53:27    Status changed to resolved by mneteler  
Mon, Feb 5 2007 21:53:26    Mail sent by mneteler  
v.in.dxf has been rewritten in GRASS 6. Closing, feel free to reopen if bug
persists in GRASS 6.3.

Markus
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request