Hello, probably this is a very simple task: How can I transform spatial points (assigned coordinates with rgdal) into a ordinary data.frame where the first column is name of the point and the second and third columns are X and Y? /johannes
transform spatial points into data.frame
3 messages · Johannes Radinger, Edzer Pebesma, Kenneth Takagi
did you try as.data.frame(x) ?
On 02/01/2012 11:33 AM, Johannes Radinger wrote:
Hello, probably this is a very simple task: How can I transform spatial points (assigned coordinates with rgdal) into a ordinary data.frame where the first column is name of the point and the second and third columns are X and Y? /johannes
_______________________________________________ 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 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de
Johannes Radinger <JRadinger <at> gmx.at> writes:
Hello, probably this is a very simple task: How can I transform spatial points (assigned
coordinates with rgdal)
into a ordinary data.frame where the first column is name of the point and the
second and third
columns are X and Y? /johannes
Hi Johannes, if it is a S3 or S4 object, you can try using the @ symbol: sp.df = myspatialpts at data where myspatialpts is the object containing your spatial points. HTH, Ken