<div dir="ltr"><div><div><div>Hello,<br><br></div><div>I have some doubts on the usage of some gdal tools. I'm trying to make a R script, but I know that we can run gdal commands from the terminal and also from QGIS. I use Linux/Ubuntu.<br><br></div><div>Well, after converting a hdf file from MODIS Aqua (L3) with sea surface temperature data to tif I want to reproject to SIRGAS2000 and clip between lats of 22 to 29 S and lats of 40 to 50 W.<br></div></div><br></div>HDF file (need to unpack) can be downloaded at <a href="https://app.box.com/s/16cf7qv6af6gsz1v66staori2mtneu0r" target="_blank">https://app.box.com/s/16cf7qv6af6gsz1v66staori2mtneu0r</a><br><br><div>To convert HDF file I'm using:<br></div><div><br>gdal_translate("A20080012008031.L3m_MO_SST_4","georef.tif",sd_index=1,a_ullr=c(0,4320,8640,0), 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")<br><br></div><div>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"<br></div><div><br>a_ullr and a_srs values I got with GDALinfo("georef.tif"). I also tryed a_ullr=c(-180,90,180,-90).</div><br><div>My problem now is reproject to SIRGAS2000 and clip the image georef.tif: <br></div><div><br>gdalwarp("georef.tif", "georef2.tif",<br>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",<br>t_srs="+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs")<br><br></div><div>georef2.tif is not in SIRGAS2000 projection and clipping option te=c(-50,-29,-40,-22) does not work.<br><br><span lang="en"><span>Where is</span> <span>my mistake</span><span>? </span></span><span lang="en"><span>I hope someone can</span> <span>tell me.<br><br></span></span></div><div><span lang="en"><span>Thanks for any help.<br><br></span></span></div><span lang="en"><span>Antonio Olinto</span></span><br></div>