James,<br><br>Instead of passing the arguments as array elements, try to pass the arguments in the same string, separated by a space.<br><a href="http://trac.osgeo.org/gdal/browser/trunk/autotest/warp/warp.py#L481">http://trac.osgeo.org/gdal/browser/trunk/autotest/warp/warp.py#L481</a><br>
<br><div class="gmail_quote">On Thu, Jan 13, 2011 at 3:06 AM, manzione <span dir="ltr"><<a href="mailto:james.j.manzione@usace.army.mil">james.j.manzione@usace.army.mil</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Greetings All,<br>
I am a student who has been having a difficult time passing in source<br>
parameters into gdalwrap in Python, and would truly appreciate any insight<br>
that great minds like you might have on my simple problem.<br>
<br>
First off, I am attempting to reproject a Tiff image that was generated from<br>
a Grib2 rasterband by using the subprocess.call(cmd) method. My cmd<br>
statement is as follows:<br>
<br>
cmd = ["gdalwarp", "-t_srs", "EPSG:4326", in_Src, target_Src]<br>
<br>
The "in_Src" parameter represents the input source file, and the<br>
"target_Src" parameter is an empty temporary file.<br>
<br>
I've seen (and tried) a lot of examples where instead of calling an object<br>
in the cmd line they call a string that references the name of the image<br>
file.<br>
<br>
Example: subprocess.call(["gdalwarp", "-t_srs", "EPSG:4326", "input.tif",<br>
"output.tif"])<br>
<br>
However each time I attempt this technique gdalwarp returns an error message<br>
that states that it cannot locate the source file. I've tried replacing the<br>
names with path locations and yet I still get the same error returned.<br>
<br>
If someone would be kind enough to show me how to get over this issue I<br>
would be incredibly grateful!<br>
<br>
Thank you in advance,<br>
<br>
-James<br>
<font color="#888888">--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Problems-with-passing-parameters-into-gdalwrap-in-Python-tp5916192p5916192.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Problems-with-passing-parameters-into-gdalwrap-in-Python-tp5916192p5916192.html</a><br>
Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>