Skip to content

generate & plot elevation contour lines

2 messages · karl.sommer at dpi.vic.gov.au, Edzer Pebesma

#
Hello list

I am making reference to the graph gallery at
http://r-spatial.sourceforge.net/gallery
I was wondering how one would go about adding elevation contour lines to
the
example fig08?  Presuming that one would have access to a number of
geo-referenced
elevation measurements with a similar density as the sampling locations
indicated with a grey x in fig08. Is there a method to generate contour
lines from such information and overlay it onto the existing interpolated
graph?

Cheers

Karl Sommer
_________________________________
Karl J Sommer,
Department of Primary Industries,
Catchment & Agriculture Services,
PO Box 905
Mildura, VIC, Australia 3502

Tel: +61 (0)3 5051 4390
Fax +61 (0)3 5051 4534

Email:     karl.sommer at dpi.vic.gov.au
#
karl.sommer at dpi.vic.gov.au wrote:
Simpler than I thought it would be: add contour = TRUE to the argument list
of spplot.

If you want the actual contours, there is a contourLines function that 
returns them; sp has a function to convert these to 
SpatialLinesDataFrame objects: contourLines2SLDF().
--
Edzer