[R-sig-Geo] gdal_translate and gdalwarp question

Antonio Silva aolinto.lst at gmail.com
Sun Sep 20 15:18:21 CEST 2015


I have some doubts on the usage of some gdal tools.

After converting a hdf file to tif I want to reproject to SIRGAS2000 and
clip between lats of 22 to 29 S and lats of 40 to 50 W.

HDF file can be downloaded at

Basically I'm following

Well to convert HDF file I'm using:

a_srs="+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371007
+b=6371007 +units=m +no_defs")

Without a_ullr and a_srs options I was getting an error message when using
gdalwarp: "ERROR 1: Unable to compute a transformation between pixel/line
and georeferenced coordinates"

a_ullr and a_srs values I got with GDALinfo("georef.tif")

map <- raster("georef.tif")

My problem now is reproject to SIRGAS2000 and clip the image georef.tif:

gdalwarp("georef.tif", "georef2.tif",
s_srs="+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371007
+b=6371007 +units=m +no_defs",
t_srs="+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs")

map2 <- raster("georef2.tif")

Map2 is not in SIRGAS2000 projection and clipping option
te=c(-50,-29,-40,-22) does not work.

Where is my mistake? I hope someone can tell me.

Thanks for any help.

Antonio Olinto

Antônio Olinto Ávila da Silva
Biólogo / Oceanógrafo
Instituto de Pesca (Fisheries Institute)
São Paulo, Brasil

	[[alternative HTML version deleted]]

More information about the R-sig-Geo mailing list