<div dir="ltr">Sure, python w/ gdal is great for doing these sanity checks. Assuming you are using a FWTools install or have the python-gdal plugin:<br><br>python<br><br>>>> import gdal<br><br>or newer version:<br>
>>> from osgeo import gdal<br><br>>>> image = gdal.Open('/the/path/to/my/raster.tif',gdal.GA_ReadOnly)<br><br>****or if your version of gdal has Grass support ****<br>>>> image = gdal.Open('/grassdir/location/mapset/cellhd/rastername',gdal.GA_ReadOnly)<br>
<br>>>> image.GetGeoTransform()<br>(-180.0, 0.0083333333333333332, 0.0, 90.0, 0.0, -0.0083333333333333332)<br><br>In my case, the source GeoTiff had a geotransform of:<br>(-180.00000000012497, 0.0083333333333333297, 0.0, 90.0, 0.0, -0.0083333333333333297)<br>
<br>One strange thing was, the original grass import (west coordinate of 180E) had the same geotransform as the corrected raster I ran r.region on. According to gdal, they were the same.<br><br>Looks like I need to file a bug report.<br>
<br>Enjoy. <br><br>-Jamie<br><br><div class="gmail_quote">On Mon, Oct 13, 2008 at 4:18 PM, Nikos Alexandris <span dir="ltr"><<a href="mailto:nikos.alexandris@felis.uni-freiburg.de">nikos.alexandris@felis.uni-freiburg.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Mon, 2008-10-13 at 16:13 -0700, Jamie Adams wrote:<br>
> Thanks for the suggestions. I opened the image up in python using<br>
> gdal, looked at the geotransform and found that the image is<br>
> ever-so-slightly shifted west (-180.00000000012497). Hence the<br>
> negative W-E center. Maybe this is why GRASS thinks it has a 180E<br>
> origin also, though I don't know.<br>
><br>
> I checked the region - same problem - then set it manually and<br>
> re-imported. Same results. In the end I was able to assign correct<br>
> extents using r.region. Though the boundary isn't exactly at 180W, I<br>
> think nine 0s after the decimal point is a bit much. :-)<br>
><br>
> Thanks again.<br>
><br>
> -Jamie<br>
<br>
</div>Jamie,<br>
<br>
would you share some python command examples (using gdal)? I am learning<br>
python stuff (although very slowly) and I would like to have some<br>
examples as the one you did.<br>
<br>
Thank you, Nikos<br>
<br>
</blockquote></div><br></div>