[R-br] ?Problema para mudar projeção em um raster

Éder Comunello comunello.eder em gmail.com
Quarta Julho 24 23:56:50 BRT 2013


Complementando a resposta anterior (abaixo), o arquivo topodata do CMR não
corresponde à área de interesse definida. A área coincidente é dada pelo
arquivo 19S435SN.zip.

###
require(raster)
url=("http://www.dsr.inpe.br/topodata/data/geotiff/19S435SN.zip")
download.file(url, destfile = "19S435SN.zip")
dem <- raster('19S435SN.tif')
###

Observe as saídas transcritas abaixo:
> extent(SP.geo)
class       : Extent
xmin        : -42.40624
xmax        : -42.37724
ymin        : -19.51573
ymax        : -19.48824
> dem <- raster('19S435SN.tif')
> extent(dem)
class       : Extent
xmin        : -43.50024
xmax        : -42
ymin        : -20
ymax        : -19


2013/7/24 Eder Comunello <ecomunel em gmail.com>

> Prezado Alexandre,
>
> Quanto ao erro de spTransform(), faltou dar espaço antes do argumento
> '+south'.
>
> ### INICIO
>
> ### bnds fornecido no CMS
> bnds <- structure(c(772259.1, 775259.1, 775259.1, 772259.1, 772259.1,
>             7843046, 7843046, 7840046, 7840046, 7843046), .Dim = c(5L, 2L
>             ), .Dimnames = list(NULL, c("x", "y")))
>
> ### CRS UTM
> SP <- SpatialPolygons(list(Polygons(list(Polygon(bnds)), "1")))
> proj4string(SP) = CRS("+proj=utm +zone=23 +south +datum=WGS84 +units=m
> +no_defs") ## Projeção
>
> ### CRS GEO
> SPgeo<- spTransform(SP, CRS("+proj=longlat +datum=WGS84")) ### aqui não é
> necessário +south
> SPgeo em bbox
>
> ### FIM
>
> Com esse código você obterá:
>
> > SPgeo em bbox
>         min       max
> x -42.40624 -42.37724
> y -19.51573 -19.48824
>
> At.te,
>
>
> --
> Éder Comunello <comunello.eder em gmail.com>
> Dourados, MS - [22 16.5'S, 54 49'W]
>



-- 
Éder Comunello <c <comunello.eder em gmail.com>omunello.eder em gmail.com>
Dourados, MS - [22 16.5'S, 54 49'W]
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20130724/92025350/attachment.html>


Mais detalhes sobre a lista de discussão R-br