Norman,<div><br></div><div>Unfortunately that's not an option - In this case, my overviews are generated separately as individual .ovr files, e.g.:</div><div><br></div><div>NGOFS_WL.tif</div><div>NGOFS_WL.tif.ovr</div>
<div>NGOFS_WL.tif.ovr.ovr</div><div>NGOFS_WL.tif.ovr.ovr.ovr</div><div>NGOFS_WL.tif.ovr.ovr.ovr.ovr</div><div><br></div><div>I'm then stitching them together into a single image with gdal_translate -co COPY_SRC_OVERVIEWS=YES before attempting to reproject the result.</div>
<div><br></div><div>Here's an example of what it looks like:</div><div><a href="http://jgreenlaw.org/gdal/ngofs-wl.png">http://jgreenlaw.org/gdal/ngofs-wl.png</a><br></div><div><br></div><div>In each overview, the "streaklet" arrows actually need to be rendered at the proper resolution; I can't simply interpolate the original image. <br>
</div><div><br></div><div>Perhaps I'm out of luck and need to reproject each of the .ovr files and the .tif files separately before combining them?</div><div><br></div><div>Jason</div><div class="gmail_extra"><br clear="all">
<div><div>--</div>Jason Greenlaw<div>Contractor, ERT, Inc.<br><div>NOAA/NOS/OCS/CSDL<div><a href="http://nowcoast.noaa.gov" target="_blank">http://nowcoast.noaa.gov</a></div><div><a href="mailto:Jason.Greenlaw@noaa.gov" target="_blank">Jason.Greenlaw@noaa.gov</a></div>
<div>(603) 862-3560</div></div></div></div>
<br><br><div class="gmail_quote">On Thu, Jan 10, 2013 at 12:37 PM, Norman Vine <span dir="ltr"><<a href="mailto:nhv@cape.com" target="_blank">nhv@cape.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Jason<div><br></div><div>you need to make overviews for the reprojected image</div><div><br></div><div>see </div><div><a href="http://www.gdal.org/gdaladdo.html" target="_blank">http://www.gdal.org/gdaladdo.html</a></div>
<div><br></div><div><br></div><div><br><div><div><div class="h5"><div>On Jan 10, 2013, at 12:20 PM, Jason Greenlaw - NOAA Affiliate <<a href="mailto:jason.greenlaw@noaa.gov" target="_blank">jason.greenlaw@noaa.gov</a>> wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5"><div>Using gdalwarp I'm attempting to reproject a 4-band (RGBA) GeoTIFF (in EPSG:4269) containing 4 overviews to web mercator (EPSG:3857). While the reprojection seems to work fine for the image itself, it appears the overviews are not being reprojected/carried over to the new reprojected GeoTIFF.</div>
<div><br></div><div>I've tried specifying -co COPY_SRC_OVERVIEWS=YES to gdalwarp, but it still results in the overviews being lost.</div><div><br></div><div>I am using GDAL 1.9.2.</div><div><br></div><div>Is this the expected behavior? Is there perhaps some way to ask gdalwarp to also reproject the overviews? Or do I have to reproject each overview individually, then merge them into a single GeoTIFF with gdal_translate?</div>
<div><br></div><div>Any help/information would be greatly appreciated.</div><div><br></div><div>Here is the gdalwarp command I'm using (esri-3857.prf contains custom EPSG:3857 WKT to be compatible with ESRI software):</div>
<div><br></div><div>---------------------------------------------------------------------<br></div><div>gdalwarp -s_srs EPSG:4269 -t_srs esri-3857.prf -r bilinear -co COMPRESS=LZW -co COPY_SRC_OVERVIEWS=YES -overwrite NGOFS_WL_4269.tif NGOFS_WL_3857.tif<br>
</div><div>---------------------------------------------------------------------<br></div><div><br></div><div>Below are the output of gdalinfo for both the source and reprojected GeoTIFFs.</div><div><br></div><div>---------------------------------------------------------------------</div>
<div><div>$ gdalinfo NGOFS_WL_4269.tif</div><div>Driver: GTiff/GeoTIFF</div><div>Files: NGOFS_WL_4269.tif</div><div>Size is 3000, 1255</div><div>Coordinate System is `'</div><div>Origin = (-97.401951999999994,30.701952500000001)</div>
<div>Pixel Size = (0.003900000000000,-0.003903000000000)</div><div>Image Structure Metadata:</div><div> COMPRESSION=LZW</div><div> INTERLEAVE=PIXEL</div><div>Corner Coordinates:</div><div>Upper Left ( -97.4019520, 30.7019525)</div>
<div>Lower Left ( -97.4019520, 25.8036875)</div><div>Upper Right ( -85.7019520, 30.7019525)</div><div>Lower Right ( -85.7019520, 25.8036875)</div><div>Center ( -91.5519520, 28.2528200)</div><div>Band 1 Block=3000x1 Type=Byte, ColorInterp=Red</div>
<div> Overviews: 1500x627, 750x313, 375x156, 187x78</div><div> Mask Flags: PER_DATASET ALPHA</div><div> Overviews of mask band: 1500x627, 750x313, 375x156, 187x78</div><div>Band 2 Block=3000x1 Type=Byte, ColorInterp=Green</div>
<div> Overviews: 1500x627, 750x313, 375x156, 187x78</div><div> Mask Flags: PER_DATASET ALPHA</div><div> Overviews of mask band: 1500x627, 750x313, 375x156, 187x78</div><div>Band 3 Block=3000x1 Type=Byte, ColorInterp=Blue</div>
<div> Overviews: 1500x627, 750x313, 375x156, 187x78</div><div> Mask Flags: PER_DATASET ALPHA</div><div> Overviews of mask band: 1500x627, 750x313, 375x156, 187x78</div><div>Band 4 Block=3000x1 Type=Byte, ColorInterp=Alpha</div>
<div> Overviews: 1500x627, 750x313, 375x156, 187x78</div></div><div>---------------------------------------------------------------------<br></div><div>---------------------------------------------------------------------<br>
</div><div><div>$ gdalinfo NGOFS_WL_3857.tif</div><div>Driver: GTiff/GeoTIFF</div><div>Files: NGOFS_WL_3857.tif</div><div>Size is 2940, 1391</div><div>Coordinate System is:</div><div>PROJCS["WGS 84 / Pseudo-Mercator",</div>
<div> GEOGCS["WGS 84",</div><div> DATUM["WGS_1984",</div><div> SPHEROID["WGS 84",6378137,298.257223563,</div><div> AUTHORITY["EPSG","7030"]],</div>
<div> AUTHORITY["EPSG","6326"]],</div><div> PRIMEM["Greenwich",0],</div><div> UNIT["degree",0.0174532925199433],</div><div> AUTHORITY["EPSG","4326"]],</div>
<div> PROJECTION["Mercator_1SP"],</div><div> PARAMETER["central_meridian",0],</div><div> PARAMETER["scale_factor",1],</div><div> PARAMETER["false_easting",0],</div><div>
PARAMETER["false_northing",0],</div><div> UNIT["metre",1,</div><div> AUTHORITY["EPSG","9001"]],</div><div> EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],</div>
<div> AUTHORITY["EPSG","3857"]]</div><div>Origin = (-10842735.698910875245929,3572289.254035749472678)</div><div>Pixel Size = (443.061998399919901,-443.061998399919901)</div><div>Metadata:</div><div>
AREA_OR_POINT=Area</div><div>Image Structure Metadata:</div><div> COMPRESSION=LZW</div><div> INTERLEAVE=PIXEL</div><div>Corner Coordinates:</div><div>Upper Left (-10842735.699, 3572289.254) ( 97d24' 7.03"W, 30d31'59.96"N)</div>
<div>Lower Left (-10842735.699, 2955990.014) ( 97d24' 7.03"W, 25d39' 5.65"N)</div><div>Upper Right (-9540133.424, 3572289.254) ( 85d42' 1.72"W, 30d31'59.96"N)</div><div>Lower Right (-9540133.424, 2955990.014) ( 85d42' 1.72"W, 25d39' 5.65"N)</div>
<div>Center (-10191434.561, 3264139.634) ( 91d33' 4.37"W, 28d 7'12.80"N)</div><div>Band 1 Block=2940x1 Type=Byte, ColorInterp=Red</div><div> Mask Flags: PER_DATASET ALPHA</div><div>Band 2 Block=2940x1 Type=Byte, ColorInterp=Green</div>
<div> Mask Flags: PER_DATASET ALPHA</div><div>Band 3 Block=2940x1 Type=Byte, ColorInterp=Blue</div><div> Mask Flags: PER_DATASET ALPHA</div><div>Band 4 Block=2940x1 Type=Byte, ColorInterp=Alpha</div></div><div>---------------------------------------------------------------------<br>
</div><br clear="all"><div><div>--</div>Jason Greenlaw<div>Contractor, ERT, Inc.<br><div>NOAA/NOS/OCS/CSDL<div><a href="http://nowcoast.noaa.gov/" target="_blank">http://nowcoast.noaa.gov</a></div><div><a href="mailto:Jason.Greenlaw@noaa.gov" target="_blank">Jason.Greenlaw@noaa.gov</a></div>
</div></div></div></div></div>
_______________________________________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">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></blockquote>
</div><br></div></div></blockquote></div><br></div>