Jason you need to make overviews for the reprojected image
see http://www.gdal.org/gdaladdo.html On Jan 10, 2013, at 12:20 PM, Jason Greenlaw - NOAA Affiliate <jason.green...@noaa.gov> wrote: > 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. > > I've tried specifying -co COPY_SRC_OVERVIEWS=YES to gdalwarp, but it still > results in the overviews being lost. > > I am using GDAL 1.9.2. > > 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? > > Any help/information would be greatly appreciated. > > Here is the gdalwarp command I'm using (esri-3857.prf contains custom > EPSG:3857 WKT to be compatible with ESRI software): > > --------------------------------------------------------------------- > 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 > --------------------------------------------------------------------- > > Below are the output of gdalinfo for both the source and reprojected GeoTIFFs. > > --------------------------------------------------------------------- > $ gdalinfo NGOFS_WL_4269.tif > Driver: GTiff/GeoTIFF > Files: NGOFS_WL_4269.tif > Size is 3000, 1255 > Coordinate System is `' > Origin = (-97.401951999999994,30.701952500000001) > Pixel Size = (0.003900000000000,-0.003903000000000) > Image Structure Metadata: > COMPRESSION=LZW > INTERLEAVE=PIXEL > Corner Coordinates: > Upper Left ( -97.4019520, 30.7019525) > Lower Left ( -97.4019520, 25.8036875) > Upper Right ( -85.7019520, 30.7019525) > Lower Right ( -85.7019520, 25.8036875) > Center ( -91.5519520, 28.2528200) > Band 1 Block=3000x1 Type=Byte, ColorInterp=Red > Overviews: 1500x627, 750x313, 375x156, 187x78 > Mask Flags: PER_DATASET ALPHA > Overviews of mask band: 1500x627, 750x313, 375x156, 187x78 > Band 2 Block=3000x1 Type=Byte, ColorInterp=Green > Overviews: 1500x627, 750x313, 375x156, 187x78 > Mask Flags: PER_DATASET ALPHA > Overviews of mask band: 1500x627, 750x313, 375x156, 187x78 > Band 3 Block=3000x1 Type=Byte, ColorInterp=Blue > Overviews: 1500x627, 750x313, 375x156, 187x78 > Mask Flags: PER_DATASET ALPHA > Overviews of mask band: 1500x627, 750x313, 375x156, 187x78 > Band 4 Block=3000x1 Type=Byte, ColorInterp=Alpha > Overviews: 1500x627, 750x313, 375x156, 187x78 > --------------------------------------------------------------------- > --------------------------------------------------------------------- > $ gdalinfo NGOFS_WL_3857.tif > Driver: GTiff/GeoTIFF > Files: NGOFS_WL_3857.tif > Size is 2940, 1391 > Coordinate System is: > PROJCS["WGS 84 / Pseudo-Mercator", > GEOGCS["WGS 84", > DATUM["WGS_1984", > SPHEROID["WGS 84",6378137,298.257223563, > AUTHORITY["EPSG","7030"]], > AUTHORITY["EPSG","6326"]], > PRIMEM["Greenwich",0], > UNIT["degree",0.0174532925199433], > AUTHORITY["EPSG","4326"]], > PROJECTION["Mercator_1SP"], > PARAMETER["central_meridian",0], > PARAMETER["scale_factor",1], > PARAMETER["false_easting",0], > PARAMETER["false_northing",0], > UNIT["metre",1, > AUTHORITY["EPSG","9001"]], > 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"], > AUTHORITY["EPSG","3857"]] > Origin = (-10842735.698910875245929,3572289.254035749472678) > Pixel Size = (443.061998399919901,-443.061998399919901) > Metadata: > AREA_OR_POINT=Area > Image Structure Metadata: > COMPRESSION=LZW > INTERLEAVE=PIXEL > Corner Coordinates: > Upper Left (-10842735.699, 3572289.254) ( 97d24' 7.03"W, 30d31'59.96"N) > Lower Left (-10842735.699, 2955990.014) ( 97d24' 7.03"W, 25d39' 5.65"N) > Upper Right (-9540133.424, 3572289.254) ( 85d42' 1.72"W, 30d31'59.96"N) > Lower Right (-9540133.424, 2955990.014) ( 85d42' 1.72"W, 25d39' 5.65"N) > Center (-10191434.561, 3264139.634) ( 91d33' 4.37"W, 28d 7'12.80"N) > Band 1 Block=2940x1 Type=Byte, ColorInterp=Red > Mask Flags: PER_DATASET ALPHA > Band 2 Block=2940x1 Type=Byte, ColorInterp=Green > Mask Flags: PER_DATASET ALPHA > Band 3 Block=2940x1 Type=Byte, ColorInterp=Blue > Mask Flags: PER_DATASET ALPHA > Band 4 Block=2940x1 Type=Byte, ColorInterp=Alpha > --------------------------------------------------------------------- > > -- > Jason Greenlaw > Contractor, ERT, Inc. > NOAA/NOS/OCS/CSDL > http://nowcoast.noaa.gov > jason.green...@noaa.gov > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev