[GRASSLIST:5872] Re: Trouble with v.in.dxf

Paul Kelly paul-grass at stjohnspoint.co.uk
Wed Mar 26 04:41:06 EST 2003


On Wed, 26 Mar 2003, Kurt Springs wrote:

> Hi Folks
>
> I finally got the GIS data for County Sligo yesterday.  These were made by
> the Ordinance Survey, of Ireland, and are in dxf format.  I thought I would
> have more luck with them, but still no joy.
>
> I used the tcltkgrass interface to run v.in.dxf.  I put the Map_8C.dxf in
> where it said file.  (I opened this file in Illustrator to view the layers,
> but did not save it.)  I typed in all the line layers (CONTOUR_10,
> CONTOUR_20, etc.) where it asked for line layers. Then typed in the
> CON_TEXT_50 layer where it asked for the data layer.  I put in CON as a

My version of tcltkgrass doesn't seem to have all those options. Just
input file, output file prefix, lines and labels. I think lines and labels
are just alternative ways of specifying which layers to import. But if you
leave them blank it just imports all the layers.

But does a simple 'v.in.dxf Map_8C.dxf' typed at the command line not
work? This should create vector layers called Map_8C.CONTOUR_10,
Map_8C.CONTOUR_20 etc. You would then be able to display the lines but they
wouldn't be labelled with the correct contour values yet. If the data is
simliar to OSNI dxf files, you would then need to run
'v.in.dxf3d dxf=Map_8C.dxf lines=CONTOUR_10,CONTOUR_20,...' and then run
the Perl script I supplied to correct the attributes, followed by a final
run of v.support. I will maybe have a look into fixing v.in.dxf3d so it
works properly. There is also a script v.in.dxf3d.sh which should perform
both the stages for you but I haven't tested it.

> prefix.  When I hit run, it seemed to see the data file, but not the line
> files.  Needless to say, I got no usable vector files. Can you see where I

When you say the line files, do you mean the layers inside the DXF file?
There is only one file you are importing that contains all the data,
right? As I said above with v.in.dxf if you leave the lines and layers
options blank it will just import all the layers (although this doesn't
work with v.in.dxf3d; you have to specify all the layers, but you already
know what they are after you've run v.in.dxf so it's all right). After you
have run v.support you can patch them together with v.patch.

> went wrong.  I wonder if they used a windows based program, and if the line
> breaks are formatted to windows?  Or do Windows and UNIX use the same line

Probably yes (OSNI do), but v.in.dxf seems to be able to cope with that.

Paul




More information about the grass-user mailing list