<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hey,<br>
<br>
The writeOGR function specifies (?writeOGR) <br>
<code>obj</code>
a SpatialPointsDataFrame, SpatialLinesDataFrame, or a
SpatialPolygonsDataFrame object.<br>
<br>
You need to convert first your SpatialPoints into spgdf<br>
<br>
Best regards<br>
<br>
<br>
Alex<br>
<br>
On 04/11/2010 12:16, Manuel Spínola wrote:
<blockquote cite="mid:4CD2880C.5030406@gmail.com" type="cite">
<pre wrap="">Dear list members,
I am trying to save a spatial point object as a shapefile, but I got an
error that I do not have the right object class, why?
> sitiosMikeCRTM05
SpatialPoints:
x y
[1,] 480244.6 1181636
[2,] 480651.1 1184371
[3,] 477555.2 1181189
[4,] 486482.8 1167946
[5,] 483764.4 1164624
[6,] 477301.6 1192979
[7,] 483737.4 1192048
[8,] 480760.2 1192652
[9,] 479985.8 1150756
[10,] 481748.5 1148902
[11,] 476126.6 1165617
[12,] 464735.7 1167079
[13,] 481182.4 1185941
[14,] 500632.8 1132727
Coordinate Reference System (CRS) arguments: +proj=tmerc +lon_0=-84
+lat_0=0 +x_0=500000 +k=0.9999 +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
> writeOGR(sitiosMikeCRTM05,
dsn="C:/ProyectosRespacial/CBSS/Shapefiles_proyectados",
layer="sitiosMikeCRTM05", driver="ESRI Shapefile")
Error en writeOGR(sitiosMikeCRTM05, dsn =
"C:/ProyectosRespacial/CBSS/Shapefiles_proyectados", :
obj of wrong class
Best,
Manuel
</pre>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
R-sig-Geo mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-sig-Geo@stat.math.ethz.ch">R-sig-Geo@stat.math.ethz.ch</a>
<a class="moz-txt-link-freetext" href="https://stat.ethz.ch/mailman/listinfo/r-sig-geo">https://stat.ethz.ch/mailman/listinfo/r-sig-geo</a>
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<address> Alexandre Villers, PhD. <br>
Postdoc researcher<br>
Spatial Ecology & Population Dynamics<br>
Section of Ecology, Department of Biology<br>
University of Turku<br>
FIN-20014 Turku<br>
Finland<br>
<br>
@mail: alexandre.villers@utu.fi<br>
phone: 00358 (0)2 333 5049<br>
<br>
Skype <a href="skype:aquila06?call"><img
src="cid:part1.01020700.08010104@gmail.com" style="border:
medium none;" alt="You can skype me (but think of using
Ekiga instead !)" height="50"></a></address>
<br>
<b>Use open source and free softwares</b><br>
<a href="http://cran.r-project.org/" title="R statistical
software"><img style="border-color: rgb(255, 255, 255);"
src="cid:part2.06060602.04020101@gmail.com" height="50"></a><spacer>
<a href="http://grass.itc.it/" title="GIS software for data
processing, easily replaces ArcMap and Mapinfo"><img
style="border-color: rgb(255, 255, 255);"
src="cid:part3.02010300.04070101@gmail.com" height="50"></a>
<a href="http://www.qgis.org/" title="GIS visualization, easily
replaces ArcMap or Mapinfo"><img style="border-color: rgb(255,
255, 255);" src="cid:part4.05010001.03060705@gmail.com"
height="50"></a> <spacer>
<a href="http://fr.openoffice.org/" title="Stop using Microsoft
Office !"><img style="border-color: rgb(255, 255, 255);"
src="cid:part5.05070301.00010509@gmail.com" height="50"></a>
<a href="http://www.mozilla-europe.org/fr/" title="Stop using
Microsoft Outlook !"><img style="border-color: rgb(255, 255,
255);" src="cid:part6.03090009.01090208@gmail.com" height="50"></a>
<a href="http://www.mozilla-europe.org/fr/" title="Stop using
Microsoft Internet Explorer !"><img style="border-color:
rgb(255, 255, 255);"
src="cid:part7.00010500.04010409@gmail.com" height="50"></a>
</div>
</body>
</html>