Skip to content
Prev 1039 / 29559 Next

problems loading spproj library for transform()

thanks for the prompt reply

the method spTransform() worked

I now have an attribute file of class SpatiaPointsDataFrame with EM38
readings.  I also have a separate shape file of class
SpatialPolygonsDataFrame which I imported form an ESRI shape file using the
readOGR() method of rgdal.  I would like to superpose the two files in a
plot but so far have not been successful in lining them up satisfactorily.
I am not sure if the misalignement is due to my misguided plotting method

p1 <- spplot(x, c("var"))  #attribute data
p2 <- spplot (x2)  # shapefile

print(p1, split = c(1,1,1,1), more = TRUE)
print(p2, split = c(1,1,1,1), more = FALSE)

or due to the fact that the projections of the two files differ.  I am not
sure how to extract projection information from the shape file.

any hints would be appreciated

Karl



|---------+----------------------------------->
|         |           Roger.Bivand at nhh.no     |
|         |           Sent by:                |
|         |           r-sig-geo-bounces at stat.m|
|         |           ath.ethz.ch             |
|         |                                   |
|         |                                   |
|         |           25/05/2006 15:41        |
|         |           Please respond to       |
|         |           Roger.Bivand            |
|         |                                   |
|---------+----------------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                              |
  |       To:       mdsumner at utas.edu.au                                                                                         |
  |       cc:       r-sig-geo at stat.math.ethz.ch                                                                                  |
  |       Subject:  Re: [R-sig-Geo] problems loading spproj library for transform()                                              |
  >------------------------------------------------------------------------------------------------------------------------------|
On Thu, 25 May 2006, Michael Sumner wrote:

            
In rgdal, try running example("spTransform-methods") - if it works, use
spTransform() instead of transform().

Sorry for the muddle.

Roger
=-100"))
"datasets"
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo