[GRASSLIST:4175] r.contour > v.out.dxf - Bug?

cbsled at ncia.net cbsled at ncia.net
Mon Jul 29 19:41:32 EDT 2002


This may or may not be a bug, 
perhaps someone who understands the inner workings of these two programs better than I do could comment.

I started the project with a USGS SDTS level 1 DEM, with a grid resolution of 30m and a vertical resolution of 1m.
The DEM was resampled to 10m horizontal resolution, then averaged with a neighborhood size of 3.
r.contour was used to generate a 50 foot interval contour map which was then output using v.out.dxf for use in a CAD program.

The problem is that some, if not all, of the contours have numerous very short line segments. I expected no segments less than 10m length, since 10m was the resolution of the region. I only noticed it because one contour has extremely short segments which wreaked havoc when scaled down to 1inch = 500m in the CAD program. Those segments are less than .1m length in the original DXF file from GRASS, they scaled to as short as .00011". A check of another contour revealed more short segments, but all were over 1m original length, and caused no problem in the CAD program.

I have previously done similar work with 30m DEM's with elevations in feet, and I did not see this problem, even though in that case, the scale factor was 1000:1 and the region was seven times larger in area.

The 'parent' segments are normal. If the contour program were clipping corners, which I don't think it is, there would be a large angular change between the parent and the short. In all cases I have checked, the short segments deviate angularly from their parent segment by only hundreths or thousandths of a degree. This makes me suspect a bug. There should be only one segment there, not two. 

Explanations, theories, comments, fixes, or workarounds?

-- 
-----------------------------------------------------------
Carl Brown cbsled at ncia.net
------------------------------------------------------
-----



More information about the grass-user mailing list