<div dir="ltr"><div>Dear Bianca,<br><br>On Thu, Mar 30, 2017 at 3:48 PM, Bianca Federici <<a href="mailto:bianca.federici@unige.it">bianca.federici@unige.it</a>> wrote:<br>><br>> Dear Markus,<br>><br>> Il 30/03/2017 15:35, Markus Metz ha scritto:<br>><br>> Dear Bianca,<br>><br>> On Thu, Mar 30, 2017 at 10:37 AM, Bianca Federici <<a href="mailto:bianca.federici@unige.it">bianca.federici@unige.it</a>> wrote:<br>> ><br>> > Dear Markus,<br>> ><br>[...]<br>><br>> The contour lines are quite coarse, and I can surely try to use other interpolation methods... but the point is:<br>> r.surf.contour works well???<br><br></div>I don't think so.<br><div><br>> 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.<br><br></div><div>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.<br><br></div><div>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.<br></div><div><br></div><div>Markus M<br></div><div><br>> Or am I wrong?<br>><br>> Thanks,<br>>     Bianca<br>><br>> > Here you may see the slope map and a slope profile that enhance the not proper result:<br>> ><br>> > <a href="https://www.dropbox.com/s/7olimii9s0m21rh/slope_contourlevel.PNG?dl=0">https://www.dropbox.com/s/7olimii9s0m21rh/slope_contourlevel.PNG?dl=0</a><br>><br>> That's the same image like in your first post?<br>><br>> No, it's not, it's a new one<br>><br>><br>><br>><br>> Markus M<br>><br>> ><br>> > I hope that you or somebody else have other suggestions ;-)<br>> ><br>> >     Bianca<br>> ><br>> ><br>> > Il 27/03/2017 21:21, Markus Metz ha scritto:<br>> ><br>> > g.region is a very powerful tool with sometimes unexpected effects. See suggested workflow below.<br>> ><br>> > On Mon, Mar 27, 2017 at 12:26 PM, Bianca Federici <<a href="mailto:bianca.federici@unige.it">bianca.federici@unige.it</a>> wrote:<br>> > ><br>> > > Dear all,<br>> > > I'm writing to report a problem I noticed using r.surf.contour.<br>> > > I created a DTM from contour lines, but I notice something a wrong behaviour of the r.surf.contour resulting map.<br>> > ><br>> > > In detail I imported with v.in.ogr a shape file describing contour lines every 25m of altitude<br>> > > 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.<br>> > > 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.<br>> > ><br>> > > 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:<br>> > > <a href="https://www.dropbox.com/s/7olimii9s0m21rh/slope_contourlevel.PNG?dl=0">https://www.dropbox.com/s/7olimii9s0m21rh/slope_contourlevel.PNG?dl=0</a><br>> > > Here you can see the DTM profile along the cross section, that shows the irregular morphology of the created DTM<br>> > > <a href="https://www.dropbox.com/s/useoxstmceyulk6/DTM_cross_section.PNG?dl=0">https://www.dropbox.com/s/useoxstmceyulk6/DTM_cross_section.PNG?dl=0</a><br>> > ><br>> > > I tested it in GRASS 6.4.4, 7.0.3 and 7.2.0, working either in Windows and in Linux.<br>> > ><br>> > > I hope that the developers team could correct this malfunction.<br>> > > Best regards,<br>> > >     Bianca<br>> > ><br>> > > PS: The used commands:<br>> > > v.in.ogr ...<br>> > > g.region -p res=1<br>> > > v.to.rast input=contourlevel25m type=line output=contourlevel25m use=attr column=ELEVATION<br>> > > g.region -p res=5<br>> > > r.surf.contour input=contourlevel25m output=dtm_contourlevel25m<br>> > > r.slope.aspect elevation=dtm_contourlevel25m slope=slope_contourlevel25m<br>> ><br>> > Please try<br>> > v.in.ogr ...<br>> > g.region -p -a res=5 vect=contourlevel25m<br>> > v.to.rast ...<br>> ><br>> > # do not change the region again<br>> > r.surf.contour ...<br>> ><br>> > HTH,<br>> ><br>> > Markus M<br>> ><br>> ><br>> > ><br>> > > --<br>> > > Eng. Bianca Federici, PhD<br>> > > Assistant Professor in Geomatics<br>> > ><br>> > > DICCA - Department of Civil, Chemical and Environmental Engineering<br>> > > Laboratory of Geodesy, Geomatics and GIS<br>> > > University of Genoa<br>> > > Via Montallegro, 1 - 16145 Genova ITALY<br>> > > Phone: +39 010 353 2421 - Fax: +39 010 353 2546<br>> > > <a href="mailto:E-mail%3Abianca.federici@unige.it">E-mail:bianca.federici@unige.it</a>  -<a href="http://www.dicca.unige.it/geomatica/ricerca">www.dicca.unige.it/geomatica/ricerca</a><br>> > ><br>> > > Gter srl Innovation in Geomatics, Gnss and Gis<br>> > > Spin-off of the University of Genoa<br>> > > Piazza De Marini 3/61, 16123 Genova<br>> > > Phone: +39 010 8694830 - Fax: +39 010 8694737 -<br>> > > <a href="mailto:E-mail%3Ainfo@gter.it">E-mail:info@gter.it</a>  -<a href="http://www.gter.it">www.gter.it</a><br>> > > <a href="http://www.facebook.com/Gteronline">www.facebook.com/Gteronline</a><br>> > > <a href="http://www.twitter.com/Gteronline">www.twitter.com/Gteronline</a><br>> > ><br>> > > -----------------------------------------------------------------<br>> > > Please consider the environment before printing this email!<br>> > ><br>> > > _______________________________________________<br>> > > grass-user mailing list<br>> > > <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> > > <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br>> ><br>> ><br>><br>><br></div></div>