[GRASS-user] Problems with r.surf.contour

Markus Metz markus.metz.giswork at gmail.com
Thu Mar 30 08:27:28 PDT 2017


Dear Bianca,

On Thu, Mar 30, 2017 at 3:48 PM, Bianca Federici <bianca.federici at unige.it>
wrote:
>
> Dear Markus,
>
> Il 30/03/2017 15:35, Markus Metz ha scritto:
>
> Dear Bianca,
>
> On Thu, Mar 30, 2017 at 10:37 AM, Bianca Federici <
bianca.federici at unige.it> wrote:
> >
> > Dear Markus,
> >
[...]
>
> The contour lines are quite coarse, and I can surely try to use other
interpolation methods... but the point is:
> r.surf.contour works well???

I don't think so.

> it's seems to me that no linear interpolation between two contour levels
is perfomed, in fact the slope is not constant between them but increase
until half the distance and then decrease, or viceversa, instead of being
constant.

There are indeed strange patterns in the slope values between contour
lines. The used distance to the second contour is not the shortest distance
to the second contour, that is a bug. The distance calculation is unusual,
it is not euclidean and not manhattan distance, no idea what kind of
distance this is.

Apart from that, I would not use linear interpolation to create a surface
from contour lines but use one of the previously mentioned r.resamp.*
modules. And r.surf.contour is incredibly slow.

Markus M

> Or am I wrong?
>
> Thanks,
>     Bianca
>
> > Here you may see the slope map and a slope profile that enhance the not
proper result:
> >
> > https://www.dropbox.com/s/7olimii9s0m21rh/slope_contourlevel.PNG?dl=0
>
> That's the same image like in your first post?
>
> No, it's not, it's a new one
>
>
>
>
> Markus M
>
> >
> > I hope that you or somebody else have other suggestions ;-)
> >
> >     Bianca
> >
> >
> > Il 27/03/2017 21:21, Markus Metz ha scritto:
> >
> > g.region is a very powerful tool with sometimes unexpected effects. See
suggested workflow below.
> >
> > On Mon, Mar 27, 2017 at 12:26 PM, Bianca Federici <
bianca.federici at unige.it> wrote:
> > >
> > > Dear all,
> > > I'm writing to report a problem I noticed using r.surf.contour.
> > > I created a DTM from contour lines, but I notice something a wrong
behaviour of the r.surf.contour resulting map.
> > >
> > > In detail I imported with v.in.ogr a shape file describing contour
lines every 25m of altitude
> > > Then, I converted in raster (setting a resolution of the
computational region equal to 1m), and created the DTM ( setting a
resolution of the computational region equal to 5m) with r.surf.contour.
> > > Either plotting a profile of the DTM and creating the slope map (with
r.slope.aspect), it's evident that r.surf.contour works bad.
> > >
> > > Here you can see the slope map, with the contour level in black, and
the position of the extracted cross section; you may notice artificial
steps mainly in corrispondence of the contour levels, instead of uniform
slopes:
> > > https://www.dropbox.com/s/7olimii9s0m21rh/slope_contourlevel.PNG?dl=0
> > > Here you can see the DTM profile along the cross section, that shows
the irregular morphology of the created DTM
> > > https://www.dropbox.com/s/useoxstmceyulk6/DTM_cross_section.PNG?dl=0
> > >
> > > I tested it in GRASS 6.4.4, 7.0.3 and 7.2.0, working either in
Windows and in Linux.
> > >
> > > I hope that the developers team could correct this malfunction.
> > > Best regards,
> > >     Bianca
> > >
> > > PS: The used commands:
> > > v.in.ogr ...
> > > g.region -p res=1
> > > v.to.rast input=contourlevel25m type=line output=contourlevel25m
use=attr column=ELEVATION
> > > g.region -p res=5
> > > r.surf.contour input=contourlevel25m output=dtm_contourlevel25m
> > > r.slope.aspect elevation=dtm_contourlevel25m
slope=slope_contourlevel25m
> >
> > Please try
> > v.in.ogr ...
> > g.region -p -a res=5 vect=contourlevel25m
> > v.to.rast ...
> >
> > # do not change the region again
> > r.surf.contour ...
> >
> > HTH,
> >
> > Markus M
> >
> >
> > >
> > > --
> > > Eng. Bianca Federici, PhD
> > > Assistant Professor in Geomatics
> > >
> > > DICCA - Department of Civil, Chemical and Environmental Engineering
> > > Laboratory of Geodesy, Geomatics and GIS
> > > University of Genoa
> > > Via Montallegro, 1 - 16145 Genova ITALY
> > > Phone: +39 010 353 2421 - Fax: +39 010 353 2546
> > > E-mail:bianca.federici at unige.it  -www.dicca.unige.it/geomatica/ricerca
> > >
> > > Gter srl Innovation in Geomatics, Gnss and Gis
> > > Spin-off of the University of Genoa
> > > Piazza De Marini 3/61, 16123 Genova
> > > Phone: +39 010 8694830 - Fax: +39 010 8694737 -
> > > E-mail:info at gter.it  -www.gter.it
> > > www.facebook.com/Gteronline
> > > www.twitter.com/Gteronline
> > >
> > > -----------------------------------------------------------------
> > > Please consider the environment before printing this email!
> > >
> > > _______________________________________________
> > > grass-user mailing list
> > > grass-user at lists.osgeo.org
> > > https://lists.osgeo.org/mailman/listinfo/grass-user
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170330/e1cd1d8c/attachment-0001.html>


More information about the grass-user mailing list