[winGRASS] problem with converting DXF to DEM
Mike Thomas
miketh at brisbane.paradigmgeo.com
Wed May 7 21:03:41 EDT 2003
Hi Knud.
Following the web reference you sent, I got an elevation raster map with
categories ranging from 1 to 23 (according to r.cats) from your DXF file by
the process outlined below.
A tif of that map (with "world file") is attached. How to relate those
Grass categories to any actual heights which might be stored in the DXF I
don't know - I'm not even certain if the file contains heights.
Nor do I know how to produce a USGS DEM file as such.
Perhaps someone else might know, so I've CC'ed the wider Grass users list. I
can send Knud's original DXF if someone is interested.
I also tried v.surf.rst - the results were similar. Be warned, it takes a
much longer time to run than the process below.
Cheers
Mike Thomas.
=== Sample Output ===================
v.in.dxf dxf=/c/Height.dxf
CONVERSION OF /c/Height.dxf TO DIG FILE: WARNING: 3-d data in dxf file
WARNING: 3-d data in dxf file
.....
WARNING: 3-d data in dxf file
100%
Following DXF layers found:
Layer 1 LAYER_002001
Layer 2 LAYER_002102
=====================================
v.in.dxf3d dxf=/c/Height.dxf line=LAYER_002001
100%
=====================================
v.support Height.LAYER_002001
V.SUPPORT:
Selected information from vector header
Organization: GRASS Development Team
Map Name: /c/Height.dxf
Source Date:
Orig. Scale: 2400
Snapping threshold 0.00
Snapp No snapping will be done
Reading Vector file 100%
Building areas 100%
Building islands (no islands present)
Attaching labels
Number of lines: 82
Number of nodes: 93
Number of areas: 0
Number of isles: 0
Number of atts : 82
Number of unattached atts : 0
Snapped lines : 0
=====================================
v.support Height.LAYER_002102
V.SUPPORT:
Selected information from vector header
Organization: GRASS Development Team
Map Name: /c/Height.dxf
Source Date:
Orig. Scale: 2400
Snapping threshold 0.00
Snapp No snapping will be done
Reading Vector file 100%
Building areas 100%
Building islands (no islands present)
Attaching labels
Number of lines: 17
Number of nodes: 34
Number of areas: 0
Number of isles: 0
Number of atts : 0
Number of unattached atts : 0
Snapped lines : 0
=====================================
# From the menu, set the region from the
# vector file Height.LAYER_002001 you
# just made (Menu item 5),
# otherwise you may not get any results
# further down
g.region
=== After doing this =============
projection: 1 (UTM)
zone: 32
north: 402418
south: 402182
east: -55243
west: -55351
e-w res: 1
n-s res: 1
total rows: 236
total cols: 108
total cells: 25,488
warning - north falls outside the default region
warning - west falls outside the default region
Do you accept this region? (y/n) [n] > y
current region set from [Height.LAYER_002001].
=====================================
# AT this point you should be able to look at the vector maps
# and see white lines on black
d.mon x0
d.vect
=====================================
# Now convert to raster
v.to.rast input=Height.LAYER_002001 output=Height.LAYER_002001.20030508
Loading vector information ... 0 mins 00 secs
Sorting areas by size ... 0 areas 0 mins 00 secs
Processing lines ... 82 lines 0 mins 00 secs
Processing sites ... 0 sites 0 mins 00 secs
Writing raster map ... 0 mins 00 secs
Creating support files for raster map ... 0 mins 00 secs
Raster map <Height.LAYER_002001.20030508> done.
Total processing time: 0 mins 00 secs
=====================================
# You should now have a displayable raster map
# with coloured lines on white
d.rast Height.LAYER_002001.20030508
100%
=====================================
r.surf.contour -f input=Height.LAYER_002001.20030508
output=Height.LAYER_002001.20030508.contour
100%
=====================================
# now display the contour map and check the values.
d.rast Height.LAYER_002001.20030508.contour
d.what.rast
Buttons
Left: what's here
Right: quit
-55307.97916667(E) 402284.5125(N)
Height.LAYER_002001.20030508.contour in miketh (22)
-55295.19583333(E) 402285.00416667(N)
Height.LAYER_002001.20030508.contour in miketh (20)
-55288.80416667(E) 402286.97083333(N)
Height.LAYER_002001.20030508.contour in miketh (19)
-55287.82083333(E) 402295.82083333(N)
Height.LAYER_002001.20030508.contour in miketh (18)
-55287.82083333(E) 402302.2125(N)
Height.LAYER_002001.20030508.contour in miketh (17)
Buttons
Left: what's here
Right: quit
-55287.82083333(E) 402306.14583333(N)
Height.LAYER_002001.20030508.contour in miketh (16)
-55276.02083333(E) 402316.9625(N)
Height.LAYER_002001.20030508.contour in miketh (14)
-55275.0375(E) 402306.14583333(N)
Height.LAYER_002001.20030508.contour in miketh (12)
-55270.6125(E) 402305.65416667(N)
Height.LAYER_002001.20030508.contour in miketh (11)
-55266.67916667(E) 402305.1625(N)
Height.LAYER_002001.20030508.contour in miketh (10)
Buttons
Left: what's here
Right: quit
-55256.84583333(E) 402304.17916667(N)
Height.LAYER_002001.20030508.contour in miketh (6)
-55254.87916667(E) 402345.97083333(N)
Height.LAYER_002001.20030508.contour in miketh (1)
-----Original Message-----
From: Knud Hillers [mailto:ktrap at frisurf.no]
Sent: Friday, May 02, 2003 12:11 AM
To: miketh at brisbane.paradigmgeo.com
Subject: Re: [winGRASS] problem with converting DXF to DEM
Hello
Thank you for your interest. Here is the link to Markus` message
http://grass.itc.it/pipermail/wingrass/2002-March/000663.html
I have included the dxf-file in this message. I have exported it from
Autocad 14, in release 12 format.
The location is UTM32, northern hemisphere..
Datum wgs84
greetings Knud Hillers
----- Original Message -----
From: Mike Thomas
To: Knud Hillers ; wingrass at grass.itc.it
Sent: Thursday, May 01, 2003 12:45 PM
Subject: Re: [winGRASS] problem with converting DXF to DEM
Hi Knud.
Please zip up the Grass location with the data and preferably a reference to
Markus' message and send it to me at:
miketh at brisbane dot paradigmgeo dot com
cc also this address and I'll try and look at the problem before Tuesday
evening.
Cheers
Mike Thomas.
----- Original Message -----
From: Knud Hillers
To: wingrass at grass.itc.it
Sent: Thursday, May 01, 2003 5:48 PM
Subject: [winGRASS] problem with converting DXF to DEM
Hei
I have installed CYGWIN and GRASS.
I have an DXF file with contour lines (I think), which is an export from a
larger height modell.
UTM 32, datum wgs84.
I want to output from WinGRASSI to a compatible USGS format DEM.
I have used a lot of time on this, but can get it to work.....
I have tried the approach meintioned earlier by Markus Neteler (Fri, 15 Mar
01:01:24), but I dont get any results...
Is there anyone who can take a look at this dxf and maybe explain how I make
this work ???
KTH - Norway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Height.tiff.tfw
Type: application/octet-stream
Size: 228 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-windows/attachments/20030508/77f2f9b6/Height.tiff.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Height.tiff.tif
Type: image/tiff
Size: 76696 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-windows/attachments/20030508/77f2f9b6/Height.tiff.tif
More information about the grass-windows
mailing list