Hello Markus<div>Thanks for the reply </div><div>To do what you suggest, I would have to retrieve LOCATION's CRS EPSG code and I'm not able to get it automatically. I only can get that PROJ4 string by using g.proj. Is there a way to automatically get a LOCATIONS's EPSG code?</div>
<div>Best regards,</div><div>Kim<br><br><div class="gmail_quote">2010/6/29 Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Tue, Jun 29, 2010 at 11:20 AM, Kim Besson <<a href="mailto:kimbesson1981@gmail.com">kimbesson1981@gmail.com</a>> wrote:<br>
> Greetings<br>
> A couple of days ago I have exchanged a few messages with Paul Kelly and<br>
> Micha Silver regarding this issue. But now I have a new example and I want<br>
> to know if I'm doing anything wrong and better understand what is GRASS<br>
> behaviour.<br>
> I'm trying to have an aumatic procedure to reproject images using gdalwarp.<br>
> First it checks image CRS (g.proj input=IMAGE -jf) and compares with<br>
> Location's CRS (g.proj -jf).<br>
> As target_CRS I'm using the output from g.proj -j -f .<br>
> In this case, g.proj -jf give me the Location«s CRS:<br>
> +proj=utm +south +no_defs +zone=24 +a=6378137 +rf=298.257223563<br>
> +towgs84=0.000,0.000,0.000 +to_meter=1<br>
> (Sidenote. This Location was created based on an EPSG)<br>
> I use this expression to warp the image:<br>
> gdalwarp -t_srs "+proj=utm +south +no_defs +zone=24 +a=6378137<br>
> +rf=298.257223563 +towgs84=0.000,0.000,0.000 +to_meter=1" input.tif<br>
> proj4.tif<br>
> But if I check proj4.tif CRS I get this:<br>
> +proj=utm +south +no_defs +zone=24 +a=6378137 +rf=298.257223563 +to_meter=1<br>
> Trying to open with OGR...<br>
> Trying to open with GDAL...<br>
> ...succeeded.<br>
> Datum <unknown> not recognised by GRASS and no parameters found<br>
> Why towgs84 is not kept in the image?<br>
<br>
</div></div>To my knowledge the GeoTIFF format is not able to keep the towgs84 string.<br>
Did you try with different formats?<br>
<br>
But in general, it may be better to assign proj metadata via EPSG code.<br>
<font color="#888888"><br>
Markus<br>
</font></blockquote></div><br></div>