<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>You have different way.</div><div>Either your data are already in a shapefile with associated coordinate files, or they are simply a txt files with coordinates and you know the projection system</div><div><br></div><div>1- Use the rgdal package.</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(176, 20, 12); "><span style="color: #007128">library</span><span style="color: #042299">(</span><span style="color: #007128">rgdal</span><span style="color: #042299">)</span><span style="font: 13.0px 'Lucida Grande'; color: #042299"><br>
</span><span style="color: #007128">poly</span><span style="color: #042299"> &lt;- </span><span style="color: #007128">readOGR</span><span style="color: #042299">(</span>"path_to_the_right_folder"<span style="color: #042299">, </span><span style="color: #007128">layer</span><span style="color: #042299">=</span>"name_of_the_files_without_extension"<span style="color: #042299">)</span><span style="font: 13.0px 'Lucida Grande'; color: #042299"><br>
</span><span style="color: #007128">summary</span><span style="color: #042299">(</span><span style="color: #007128">poly</span><span style="font: 13.0px 'Lucida Grande'; color: #042299">)</span></div></div><div><span style="font: 13.0px 'Lucida Grande'; color: #042299"><br></span></div><div><font class="Apple-style-span" color="#042299" face="'Lucida Grande'" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" color="#042299" face="'Lucida Grande'" size="3"><span class="Apple-style-span" style="font-size: 13px;">2- In a text file you import in R with the name 'plots'</span></font></div><div><font class="Apple-style-span" color="#042299" face="'Lucida Grande'" size="3"><span class="Apple-style-span" style="font-size: 13px;">Let's say you use the WGS84 projections and the coordinates are in columns X_WGS84 and Y_WGS84</span></font></div><div><font class="Apple-style-span" color="#042299" face="'Lucida Grande'" size="3"><span class="Apple-style-span" style="font-size: 13px;"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(176, 20, 12); "><span style="color: #042299">&nbsp;</span><span style="color: #007128">pointsWGS84</span><span style="color: #042299"> &lt;- </span><span style="color: #007128">plots</span><span style="color: #042299">[,</span><span style="color: #007128">c</span><span style="color: #042299">(</span>"X_WGS84"<span style="color: #042299">, </span>"Y_WGS84"<span style="color: #042299">)]</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><span style="color: #042299">&nbsp;</span>colnames<span style="color: #042299">(</span>pointsWGS84<span style="color: #042299">) &lt;- </span>c<span style="color: #042299">(</span><span style="color: #b0140c">"x"</span><span style="color: #042299">,</span><span style="color: #b0140c">"y"</span><span style="color: #042299">)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><span style="color: #042299">&nbsp;</span>coordinates<span style="color: #042299">(</span>pointsWGS84<span style="color: #042299">) &lt;- </span>c<span style="color: #042299">(</span><span style="color: #b0140c">"x"</span><span style="color: #042299">, </span><span style="color: #b0140c">"y"</span><span style="color: #042299">)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><span style="color: #042299">### stipulate to R what is the projection. Look at the help file for proj4string</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(176, 20, 12); "><span style="color: #042299">&nbsp;</span><span style="color: #007128">proj4string</span><span style="color: #042299">(</span><span style="color: #007128">pointsWGS84</span><span style="color: #042299">) &lt;- </span><span style="color: #007128">CRS</span><span style="color: #042299">(</span>"+proj=latlong +datum=WGS84"<span style="color: #042299">) </span><span style="color: #a941cb"># WGS84 projection string</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><span style="color: #042299">&nbsp;</span>head<span style="color: #042299">(</span>pointsWGS84<span style="color: #042299">@</span>coords<span style="color: #042299">)</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><span style="color: #042299"><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><span style="color: #042299">#if you want to transform the coordinates in another projection system. For instance here in Lambert for France II étendu.</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><span style="color: #042299"># first create the projection file:&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(176, 20, 12); "><span style="color: #007128">proj4NTFII</span><span style="color: #042299"> &lt;- </span>"+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(169, 65, 203); "><span style="color: #042299">&nbsp; </span>#EPSG Projection 27582 - NTF (Paris) / France II</div><div><br></div><div><br></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); "><span style="color: #042299"></span>pointsNTFII<span style="color: #042299"> &lt;- </span><b>spTransform</b><span style="color: #042299">(</span>pointsWGS84<span style="color: #042299">, </span>CRS<span style="color: #042299">(</span>proj4NTFII<span style="color: #042299">))</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 15px; font: normal normal normal 13px/normal 'Courier New'; color: rgb(0, 113, 40); ">head<span style="color: #042299">(</span>pointsNTFII<span style="color: #042299">@</span>coords<span style="color: #042299">)&nbsp;</span></div></span></font></div><div><font class="Apple-style-span" color="#042299" face="'Lucida Grande'" size="3"><span class="Apple-style-span" style="font-size: 13px; "><br></span></font></div><div>You have most of the projection system here:</div><div><br></div><div><a href="http://www.remotesensing.org/geotiff/proj_list/">http://www.remotesensing.org/geotiff/proj_list/</a></div><div><br></div><div><br></div><div><br></div><br><div><div>Le 10 sept. 2010 à 22:36, Manuel Spínola a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div> Dear list members,<br><br>How do I import data in geographical coordinates to R?<br><br>ref1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ref2<br>N10 41 08.7 &nbsp;&nbsp;&nbsp;&nbsp;W84 10 46.3<br>N10 41 06.8 &nbsp;&nbsp;&nbsp;&nbsp;W84 10 46.4<br>N10 41 06.4 &nbsp;&nbsp;&nbsp;&nbsp;W84 10 44.6<br>N10 41 05.6 &nbsp;&nbsp;&nbsp;&nbsp;W84 10 46.0<br><br>Best,<br><br>Manuel<br><br>-- <br>Manuel Spínola, Ph.D.<br>Instituto Internacional en Conservación y Manejo de Vida Silvestre<br>Universidad Nacional<br>Apartado 1350-3000<br>Heredia<br>COSTA RICA<br><a href="mailto:mspinola@una.ac.cr">mspinola@una.ac.cr</a><br>mspinola10@gmail.com<br>Teléfono: (506) 2277-3598<br>Fax: (506) 2237-7036<br><br>_______________________________________________<br>Biomod-commits mailing list<br>Biomod-commits@lists.r-forge.r-project.org<br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits<br></div></blockquote></div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="font-size: 12px; "><div>--------------------------</div><div>Dr. Wilfried Thuiller</div><div>Laboratoire d'Ecologie Alpine, UMR CNRS 5553</div><div>Université Joseph Fourier</div><div>BP53, 38041 Grenoble cedex 9, France</div><div>tel: +33 (0)4 76 51 44 97</div><div>fax: +33 (0)4 76 51 42 79</div><div><br></div><div>Email:&nbsp;<a href="mailto:wilfried.thuiller@ujf-grenoble.fr">wilfried.thuiller@ujf-grenoble.fr</a><br>Home page:&nbsp;<a href="http://www.will.chez-alice.fr/">http://www.will.chez-alice.fr</a><br>Website:&nbsp;<a href="http://www-leca.ujf-grenoble.fr/equipes/tde.htm">http://www-leca.ujf-grenoble.fr/equipes/tde.htm</a><br><br>FP6 European MACIS project:&nbsp;<a href="http://www.macis-project.net/">http://www.macis-project.net</a><br>FP6 European EcoChange project:&nbsp;<a href="http://www.ecochange-project.eu/">http://www.ecochange-project.eu</a></div><div><br></div></span></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></body></html>