<div dir="ltr"><div>Alexandre, bom dia!</div><div><br></div><div>Você pode manipular o objeto 'sp', resultante da importação, com a função elide() do pacote {maptools}. Se precisar de um novo shapefile, utilize a função writeOGR() ou similar.</div>
<br><div><font face="courier new, monospace">### <code r></font></div><div><div><font face="courier new, monospace">setwd("C:/LAB/RGIS/coords/elide")</font></div><div><font face="courier new, monospace">lapply(c('rgdal', 'maptools', 'shapefiles'), require, character.only=TRUE)</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">#Download do controno da área em shapefile</font></div><div><font face="courier new, monospace">links <- c(</font></div>
<div><font face="courier new, monospace">"<a href="http://dl.dropbox.com/s/1oz5lhnk96jih3w/Tamandua288.dbf">http://dl.dropbox.com/s/1oz5lhnk96jih3w/Tamandua288.dbf</a>",</font></div><div><font face="courier new, monospace">"<a href="http://dl.dropbox.com/s/6b3uygyrjhq1bby/Tamandua288.shp">http://dl.dropbox.com/s/6b3uygyrjhq1bby/Tamandua288.shp</a>",</font></div>
<div><font face="courier new, monospace">"<a href="http://dl.dropbox.com/s/wntluhn8bi7us2f/Tamandua288.shx">http://dl.dropbox.com/s/wntluhn8bi7us2f/Tamandua288.shx</a>")</font></div><div><font face="courier new, monospace"><br>
</font></div><div><font face="courier new, monospace">if (sum(sapply(basename(links), file.exists))>3) {</font></div><div><font face="courier new, monospace"> lapply(links, function(a) tryCatch(download.file(a, dest=basename(a), mode='wb'),</font></div>
<div><font face="courier new, monospace"> error=function(...) message("ERRO!")))} else message('OK!')</font></div><div><font face="courier new, monospace"><br>
</font></div><div><font face="courier new, monospace">## Abrir e visualizar contorno</font></div><div><font face="courier new, monospace">CRS.new <- CRS("+proj=utm +zone=23 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0")</font></div>
<div><font face="courier new, monospace">cont <- readOGR(getwd(), "Tamandua288")</font></div><div><font face="courier new, monospace">cont@bbox</font></div><div><font face="courier new, monospace">proj4string(cont) <- CRS.new</font></div>
<div><font face="courier new, monospace">plot(cont)</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">cont2 <- elide(cont, shift=c(1032,280))</font></div><div>
<font face="courier new, monospace">plot(cont2, col=3, add=T)</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">ogrDrivers()</font></div><div><font face="courier new, monospace">writeOGR(cont2, getwd(), 'cont2', 'ESRI Shapefile')</font></div>
<div><font face="courier new, monospace">dir(patt='.*shp')</font></div></div><div><font face="courier new, monospace">### </code></font></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">Éder Comunello <<a href="mailto:comunello.eder@gmail.com" target="_blank">c</a><a href="mailto:omunello.eder@gmail.com" target="_blank">omunello.eder@gmail.com</a>> <br>
Dourados, MS - [22 16.5'S, 54 49'W]<br></div></div>
<br></div></div>