[gdal-dev] GDALSuggestedWarpOutput() problem

joem at hiltonsoftware.com joem at hiltonsoftware.com
Tue Dec 9 12:09:59 PST 2014


Hey everyone,


I am working on a tool to project FAA charts from Lambert Conformal Conic to
Web Mercator (EPSG 900913).  It seems to be producing correct output except
for a FAA chart of the East Aleutian Islands.    When I traced the problem
in my code, it appears that GDALSuggestedWarpOutput() is giving me a width
and height far too small given the input tiff had larger dimensions.  The
source GeoTiff has dimensions of 15555x5786 but GDALSuggestedWarpOutput()
gives a suggested width of 17050  and a height of 178.  A height of 178
pixels surely has to be wrong.    I have added the well-known text and
proj.4  output from gdalinfo.exe of the input tiff below.   Although I am
not entirely sure if I should, I have been using the values supplied by
GDALSuggestedWarpOutput() for creating my output Geotiff as if the output
will always be valid.  

* Why is GDALSuggestedWarpOutput() giving bad values for the width and
height of the output tiff?
* Is this incorrect usage of GDALSuggestedWarpOutput() or is it a bug?


PROJ.4 : '+proj=lcc +lat_1=54.66666666666666 +lat_2=49.33333333333334
+lat_0=52.16666666666666 +lon_0=-177.5 +x_0=0 +y_0=0 +datum=NAD83 +units=m
+no_defs '

OGC WKT :
PROJCS["unnamed",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.2572221010002,
                AUTHORITY["EPSG","7019"]],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",54.66666666666666],
    PARAMETER["standard_parallel_2",49.33333333333334],
    PARAMETER["latitude_of_origin",52.16666666666666],
    PARAMETER["central_meridian",-177.5],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]





More information about the gdal-dev mailing list