point.in.polygon() or over() help?
On 05/23/2013 07:08 PM, Chris Waigl wrote:
Hi Roger- Getting closer to fixing the problem. You were correct with the
proj4string differing. The fish capture coordinates are "NA" and the Basins
are "+proj=longlat +ellps=WGS84." So now I am trying to convert the points.
Here is the code I input:
cap.coords.sp<-spTransform(cap.coords.sp,CRS("+proj=longlat"))
Would this work: proj4string(cap.coords.sp) <- "+proj=longlat +datum=WGS84"
this will only change the proj4string, but not reproject (and warn about this fact). You have to use spTransform with the string containing the datum.
(Or maybe "+proj=longlat +ellps=WGS84" -- not sure why I use +datum and you use +ellps.) Best regards, Chris Waigl
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de