Prezado Alexandro,<br><br>seguindo sua sugestão ocorreu o seguinte, com os dois arquivos que tenho:<br><br>> library(maptools)<br>> mg<-readShapePoly(file.choose())<br>Enter file name: 31DSE250GC_SIR<br>Shapefile type: PolygonM (25), # of Shapes: 1633<br>
<br>Erro em read.shape(filen = fn, verbose = verbose, repair = repair) : <br>  Shapefile type not (yet) handled by this function<br><br>> mg<-readShapePoly(file.choose())<br>Enter file name: 31MUE250GC_SIR<br>Shapefile type: PolygonM (25), # of Shapes: 853<br>
<br>Erro em read.shape(filen = fn, verbose = verbose, repair = repair) : <br>  Shapefile type not (yet) handled by this function<br><br>Sabe como resolver?<br><br>Prezado Jackson,<br><br>seguindo sua sugestão, utilizando o rgal, consegui ler os dois arquivos, mas você sabe o que significa esta mensagem de aviso perdida?<br>
<br>> mg <- readOGR(".", "31DSE250GC_SIR")<br>OGR data source with driver: ESRI Shapefile <br>Source: ".", layer: "31DSE250GC_SIR"<br>with 1633 features and 3 fields<br>Feature type: wkbPolygon with 3 dimensions<br>
Mensagens de aviso perdidas:<br>In readOGR(".", "31DSE250GC_SIR") : Z-dimension discarded<br>> names(mg)<br>[1] "ID"         "CD_GEOCODD" "NM_DISTRIT"<br><br>> mg1 <- readOGR(".", "31MUE250GC_SIR")<br>
OGR data source with driver: ESRI Shapefile <br>Source: ".", layer: "31MUE250GC_SIR"<br>with 853 features and 3 fields<br>Feature type: wkbPolygon with 3 dimensions<br>Mensagens de aviso perdidas:<br>In readOGR(".", "31MUE250GC_SIR") : Z-dimension discarded<br>
<br>Agradeço antecipadamente a ajuda.<br><br>Att.,<br>Emerson.<br><br><div class="gmail_quote">Em 27 de setembro de 2012 19:32, Jakson Alves de Aquino <span dir="ltr"><<a href="mailto:jalvesaq@gmail.com" target="_blank">jalvesaq@gmail.com</a>></span> escreveu:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2012/9/26 Emerson Cotta Bodevan <<a href="mailto:bodevan.ec@gmail.com">bodevan.ec@gmail.com</a>>:<br>
<div class="im">> Primeiramente, uso o UBUNTU e o EMACS.<br>
><br>
> Estou tentando ler um shapefile que baixei do site do IBGE. São dois<br>
> arquivos:<br>
><br>
> 31mu2500gsd.shp e 31mu2500gsr.shp<br>
><br>
> Instalei o pacote maptools e não consegui instalar o rgeos (dúvida enviada<br>
> para a lista em outro e-mail)<br>
><br>
> ao digitar o comando:<br>
><br>
> mg<-readShapePoly("31mu2500gsr.shp") ou<br>
> mg<-readShapePoly("31mu2500gsd.shp")<br>
><br>
> Aparece a mensagem<br>
><br>
>  mg<-readShapePoly("31mu2500gsd.shp")<br>
> Erro em make.names(onames, unique = TRUE) : string multibyte inválida 5<br>
><br>
>  mg<-readShapePoly("31mu2500gsr.shp")<br>
> Erro em make.names(onames, unique = TRUE) : string multibyte inválida 5<br>
<br>
</div>O pacote rgdal também tem uma função para ler shapefile. Talvez funcione:<br>
<br>
library(rgdal)<br>
mg <- readOGR(".", "31mu2500gsr")<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br>
</div></div></blockquote></div><br>