[GRASS-user] r.contour: levels vs step

   The r.contour manual page has no example using levels rather than step.
Under what circumstances would levels be preferred to step? Do they produce
equivalent outputs?

Rich

On Thu, 6 Oct 2016, Stuart Edwards wrote:

Step will create all the contours in the dem at the 'step' interval (e.g.
2 ft will produce 20,22,24,26 etc) Levels will create them just where you
specify e.g. 45, 50, 55, 60, 70, 80 etc.

Stu,

   That's what I thought. So for the same intervals there's no difference
between the two.

Thanks,

Rich

On Thu, Oct 6, 2016 at 7:38 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Thu, 6 Oct 2016, Stuart Edwards wrote:

Step will create all the contours in the dem at the 'step' interval (e.g.
2 ft will produce 20,22,24,26 etc) Levels will create them just where you
specify e.g. 45, 50, 55, 60, 70, 80 etc.

Stu,

  That's what I thought. So for the same intervals there's no difference
between the two.

Please consider to write a small text snippet to be added to the
manual page explaining the levels in an example (based in the North
Carolina sample dataset).

thanks
Markus

On Thu, 6 Oct 2016, Markus Neteler wrote:

Please consider to write a small text snippet to be added to the manual
page explaining the levels in an example (based in the North Carolina
sample dataset).

Markus,

   OK. I'll do this.

Rich

On Thu, 6 Oct 2016, Markus Neteler wrote:

Please consider to write a small text snippet to be added to the manual
page explaining the levels in an example (based in the North Carolina
sample dataset).

Markus,

   Using the small NC data set's PERMANENT mapset I ran

r.contour in=elevation out=contours levels=60,90,120,150

and produced the attached map.

   Is this what you asked?

Regards,

Rich

(attachments)

30-m-contours-nc-data.png

On Thu, 6 Oct 2016, Stuart Edwards wrote:

nice to label them too - see label tab in d.vect

Stu,

   OK. See attached.

Rich

(attachments)

30-m-contours-nc-data.png

On Thu, 6 Oct 2016, Stuart Edwards wrote:

yes ..... not always as pretty as you would like but gets the job done

   Always willing to accomodate when I can. :slight_smile:

Rich

On Fri, Oct 7, 2016 at 12:24 AM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Thu, 6 Oct 2016, Markus Neteler wrote:

Please consider to write a small text snippet to be added to the manual
page explaining the levels in an example (based in the North Carolina
sample dataset).

Markus,

  Using the small NC data set's PERMANENT mapset I ran

r.contour in=elevation out=contours levels=60,90,120,150

and produced the attached map.

Thanks.

  Is this what you asked?

Well, yes and no: For a full example, it would also include a sentence
describing what it is about plus the g.region command to set the
computational region etc.

To make the screenshot more attractive (about screenshot size and
quality, see https://trac.osgeo.org/grass/wiki/Submitting/Docs#Images),
we could include the shaded terrain as background:

g.region raster=elevation
r.contour in=elevation out=contours levels=60,90,120,150 --o
d.mon wx0
d.rast elevation_shade
d.vect contours color=red

best,
Markus

On Fri, 7 Oct 2016, Markus Neteler wrote:

Well, yes and no: For a full example, it would also include a sentence
describing what it is about plus the g.region command to set the
computational region etc.

Markus,

   I assumed that was already on the manual page and I was adding a third
example, similar to the two existing ones.

To make the screenshot more attractive (about screenshot size and
quality, see https://trac.osgeo.org/grass/wiki/Submitting/Docs#Images),
we could include the shaded terrain as background:

g.region raster=elevation
r.contour in=elevation out=contours levels=60,90,120,150 --o
d.mon wx0
d.rast elevation_shade
d.vect contours color=red

   OK. I'll do this over the weekend.

Rich

On Fri, 7 Oct 2016, Markus Neteler wrote:

Well, yes and no: For a full example, it would also include a sentence
describing what it is about plus the g.region command to set the
computational region etc.

   For an example of using levels with r.contour this example uses the
elevation map from the North Carolina database:

   g.region raster=elevation
   r.contour in=elevation out=contours levels=60,90,120,150 --o
   d.mon wx0
   d.rast elevation_shade
   d.vect contours color=red

To make the screenshot more attractive (about screenshot size and
quality, see https://trac.osgeo.org/grass/wiki/Submitting/Docs#Images),
we could include the shaded terrain as background:

   I don't have pngng installed here; the attached image is scaled to 600 dpi
horizontal and propotional vertical density.

Rich

(attachments)

r.contour-sample-using-levels.png

On Fri, 7 Oct 2016, Rich Shepard wrote:

I don't have pngng ...

                     ^
   Make that pngnq.

Rich

Rich,

On Fri, Oct 7, 2016 at 10:58 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Fri, 7 Oct 2016, Markus Neteler wrote:

Well, yes and no: For a full example, it would also include a sentence
describing what it is about plus the g.region command to set the
computational region etc.

  For an example of using levels with r.contour this example uses the
elevation map from the North Carolina database:

        g.region raster=elevation
        r.contour in=elevation out=contours levels=60,90,120,150 --o
        d.mon wx0
        d.rast elevation_shade
        d.vect contours color=red

To make the screenshot more attractive (about screenshot size and
quality, see https://trac.osgeo.org/grass/wiki/Submitting/Docs#Images),
we could include the shaded terrain as background:

Thanks & sorry for the delay. I have added your example to the manual
page (both trunk and 7.2.svn).

Best
Markus

On Fri, 9 Dec 2016, Markus Neteler wrote:

Thanks & sorry for the delay. I have added your example to the manual page
(both trunk and 7.2.svn).

Markus,

   The timing has not been an issue for me. I'm not now using GRASS on a
project since I completed the hydrological analyses necessary for litigation
support.

Happy holidays,

Rich

--
Richard Shepard, Ph.D. Have Knowledge - Will Travel
Applied Ecosystem Services, Inc. Troutdale, OR 97060 USA
www[dot]appl-ecosys[dot]com Voice: 503-667-4517 Fax: 503-667-8863