[R] map + some arbitrary locations' heights: some kind of perspective or contour plot possible?
Roger Bivand
Roger.Bivand at nhh.no
Fri Oct 10 20:00:23 CEST 2008
Werner Wernersen <pensterfuzzer <at> yahoo.de> writes:
>
> Hi,
>
> I thought about this but programming it seems rather difficult so I was
> wondering if a function exists for
> this in R (as most of the times it turns out that it does):
> I have a map (shapefile) and for about 50 points on that map (GPS locations)
> I have heights. Is there a
> function which can make a perspective plot or contour plot or the like from
> this little data? Or maybe some
> function I can abuse?
>
The perspective, image, and contour plots all expect you to have interpolated
to a regular grid first. It is perhaps easiest to use interp() in the akima
package for this, although there are lots of alternatives. There has just been
a thread on this on R-sig-geo, subject: "interp.old and write.ascii.grid",
showing how also to export the interpolated values to a grid file.
Roger Bivand
> Thanks for any suggestions,
> Werner
>
More information about the R-help
mailing list