Skip to content
Prev 1147 / 29559 Next

generate & plot elevation contour lines

|---------+---------------------------->
|         |           e.pebesma at geo.uu.|
|         |           nl               |
|         |                            |
|         |           27/06/2006 19:12 |
|         |                            |
|---------+---------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                              |
  |       To:       karl.sommer at dpi.vic.gov.au                                                                                   |
  |       cc:       r-sig-geo at stat.math.ethz.ch                                                                                  |
  |       Subject:  Re: [R-sig-Geo]  generate & plot elevation contour lines                                                     |
  >------------------------------------------------------------------------------------------------------------------------------|
karl.sommer at dpi.vic.gov.au wrote:
In that case you could pass them as a SpatialLinesDataFrame
object in the sp.layout list. It will not automatically print the
contour values, but you may be able to use colour; the corresponding
legend will be the next issue, then.
--
Edzer

I have tried unsuccessfully to generate a SpatialLinesDataFrame object for
passing in sp.layout

I was trying to use the contourLines() function without success, probably I
didn't get the syntax right

I tried to use the function on an object of class SpatialPixelsDataFrame
(topo.idw) which I generated from a set of  elevation measurements
class(topo.idw)
[1] "SpatialPixelsDataFrame"
attr(,"package")
[1] "sp"

running the function contourLines() directly I get the following error
Error in contourLines(topo.idw["var1.pred"]) :
      no proper 'z' matrix specified

running the function contour(topo.idw["var1.pred"]) I get a correct plot of
the contour lines

when I am trying to combine contourLines2SLDF() and contour() I get the
following error message
Error in contourLines2SLDF(contour(topo.idw["var1.pred"])) :
      cL too short

I am not sure how to progress from here

Regards

Karl