[Gdal-dev] gdalwarp doesn't work on lcc

Fu Chen fchen at ne.rsgs.ac.cn
Wed Oct 29 21:18:50 EST 2003


Hi!
GdalWarp doesn't work when i try to convert a image into lcc project.

the source image is
=====================================================
D:\gdal>apps\gdalinfo e:n-51-45-1n.tif
GDAL: GDALOpen(e:n-51-45-1n.tif) succeeds as GTiff.

Driver: GTiff/GeoTIFF
Size is 657, 20101
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.2572235630016,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",123],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32651"]]
Origin = (213536.250000,5543948.250000)
Pixel Size = (28.500000,-28.500000)
Corner Coordinates:
Upper Left  (  213536.250, 5543948.250) (119d 0'14.54"E, 49d58'44.30"N)
Lower Left  (  213536.250, 4971069.750) (119d22'32.70"E, 44d50'7.82"N)
Upper Right (  232260.750, 5543948.250) (119d15'52.64"E, 49d59'15.60"N)
Lower Right (  232260.750, 4971069.750) (119d36'43.99"E, 44d50'33.99"N)
Center      (  222898.500, 5257509.000) (119d19'35.77"E, 47d24'43.68"N)
Band 1 Block=657x12 Type=Byte, ColorInterp=Red
Band 2 Block=657x12 Type=Byte, ColorInterp=Green
Band 3 Block=657x12 Type=Byte, ColorInterp=Blue
GDAL: GDALClose(e:n-51-45-1n.tif)

GDAL: GDALDeregister_GTiff() called.
=================================================

And I try the command
=================================================
D:\gdal>apps\gdalwarp -t_srs "+proj=lcc +lon_0=110 +lat_0=10 +lat_1=25 +lat_2=47
 +datum=WGS84" e:n-51-45-1n.tif e:warped.tif
GDAL: GDALOpen(e:n-51-45-1n.tif) succeeds as GTiff.

GDAL: GDALOpen(e:warped.tif) succeeds as GTiff.

GDAL: GDALWarpKernel()::GWKNearestNoMasksByte()
Src=0,0,0x0 Dst=0,0,657x20101
:0...10...20...30...40...50...60...70...80...90...100 - done.
GDAL: Potential thrashing on band 1 of e:warped.tif.
GDAL: GDALClose(e:warped.tif)

GDAL: 1677 block reads on 1676 block band 1 of e:warped.tif.
GDAL: GDALClose(e:n-51-45-1n.tif)

GDAL: GDALDeregister_GTiff() called.
=================================================

But what i get is just the same image as source one in size and in content. 
=================================================
D:\gdal>apps\gdalinfo e:warped.tif
GDAL: GDALOpen(e:warped.tif) succeeds as GTiff.

Driver: GTiff/GeoTIFF
Size is 657, 20101
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["unknown",
            SPHEROID["unnamed",6378245,298.2999999999985]],
        PRIMEM["Greenwich",0],
        UNIT[,0.0174532925199433]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",25],
    PARAMETER["standard_parallel_2",47],
    PARAMETER["latitude_of_origin",10],
    PARAMETER["central_meridian",110],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (213536.250000,5543948.250000)
Pixel Size = (28.500000,-28.500000)
Corner Coordinates:
Upper Left  (  213536.250, 5543948.250) (113d28'21.90"E, 59d15'54.10"N)
Lower Left  (  213536.250, 4971069.750) (113d10'5.28"E, 54d24'2.61"N)
Upper Right (  232260.750, 5543948.250) (113d46'37.09"E, 59d15'33.10"N)
Lower Right (  232260.750, 4971069.750) (113d26'44.57"E, 54d23'42.69"N)
Center      (  222898.500, 5257509.000) (113d27'31.00"E, 56d51'13.71"N)
Band 1 Block=657x12 Type=Byte, ColorInterp=Red
Band 2 Block=657x12 Type=Byte, ColorInterp=Green
Band 3 Block=657x12 Type=Byte, ColorInterp=Blue
GDAL: GDALClose(e:warped.tif)

GDAL: GDALDeregister_GTiff() called.
==================================================
D:\gdal>apps\gdalinfo e:warped.tif
GDAL: GDALOpen(e:warped.tif) succeeds as GTiff.

Driver: GTiff/GeoTIFF
Size is 657, 20101
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["unknown",
            SPHEROID["unnamed",6378245,298.2999999999985]],
        PRIMEM["Greenwich",0],
        UNIT[,0.0174532925199433]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",25],
    PARAMETER["standard_parallel_2",47],
    PARAMETER["latitude_of_origin",10],
    PARAMETER["central_meridian",110],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (213536.250000,5543948.250000)
Pixel Size = (28.500000,-28.500000)
Corner Coordinates:
Upper Left  (  213536.250, 5543948.250) (113d28'21.90"E, 59d15'54.10"N)
Lower Left  (  213536.250, 4971069.750) (113d10'5.28"E, 54d24'2.61"N)
Upper Right (  232260.750, 5543948.250) (113d46'37.09"E, 59d15'33.10"N)
Lower Right (  232260.750, 4971069.750) (113d26'44.57"E, 54d23'42.69"N)
Center      (  222898.500, 5257509.000) (113d27'31.00"E, 56d51'13.71"N)
Band 1 Block=657x12 Type=Byte, ColorInterp=Red
Band 2 Block=657x12 Type=Byte, ColorInterp=Green
Band 3 Block=657x12 Type=Byte, ColorInterp=Blue
GDAL: GDALClose(e:warped.tif)

GDAL: GDALDeregister_GTiff() called.
=================================================

I can use gdalwarp to turn it into utm's other zone, and can see the diferent in size and image content.
I don't know why lcc doesn't work. 
Do I miss something?


Best regards

Fu CHEN



More information about the Gdal-dev mailing list