<div dir="ltr">Gotcha.  Thanks for both pieces of info.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 15, 2013 at 9:33 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le jeudi 15 août 2013 15:25:47, Reaves, Timothy a écrit :<br>
<div class="im">> I'm converting some GeoPDF files to TIFF.  I want to crop, and I need to<br>
> re-project.  I can do one or the other, but, when I combine them, all I get<br>
> is a black output.<br>
><br>
> The base command is:<br>
> gdalwarp -multi -co "TILED=YES" infile.pdf outfile.tiff --config<br>
> GDAL_PDF_LAYERS_OFF "Map_Collar","Map_Frame.Projection_and_Grids"<br>
><br>
> Then, I use either:<br>
> -crop_to_cutline -cutline cutline.csv -overwrite<br>
> or<br>
> -t_srs EPSG:3785<br>
><br>
> Either of these works.  Just not both.  Are the two options mutually<br>
> exclusive?<br>
<br>
</div>Thimothy,<br>
<br>
According to the gdalwarp manual : "If the OGR layer containing the<br>
cutline features has no explicit SRS, the cutline features must be in the<br>
georeferenced units of the destination file.".<br>
<br>
CSV have no explicit SRS, so to use -t_srs EPSG:3785, the CSV must be itself<br>
in EPSG:3785<br>
<br>
So you could do a preprocessing step :<br>
<br>
ogr2ogr -s_srs EPSG:XXXX -t_srs EPSG:3785 cutline_3785.csv cutline.csv<br>
<br>
where XXXX is the EPSG code of the GeoPDF<br>
<br>
And then use cutline_3785.csv as the value of the -cutline parameter of<br>
gdalwarp.<br>
<div class="im"><br>
><br>
> As an aside, when cropping, how do I make the area outside of the image<br>
> transparent instead of black?<br>
<br>
</div>Try adding -dstalpha to your gdalwarp command line.<br>
<span class="HOEnZb"><font color="#888888"><br>
Even<br>
<br>
--<br>
Geospatial professional services<br>
<a href="http://even.rouault.free.fr/services.html" target="_blank">http://even.rouault.free.fr/services.html</a><br>
</font></span></blockquote></div><br></div>