[Gdal-dev] gdalwarp doesn't work on lcc
Frank Warmerdam
warmerdam at pobox.com
Fri Oct 31 10:32:31 EST 2003
Fu Chen wrote:
> Hi!
> GdalWarp doesn't work when i try to convert a image into lcc project.
Fu Chen,
I made a quick effort to reproduce this problem and things seemed to work
ok for me. I created a file intended to be similar to your source file in
coordinate system at least:
warmerda at gdal2200[17]% gdalinfo chen.tif
Driver: GTiff/GeoTIFF
Size is 512, 512
Coordinate System is:
PROJCS["WGS 84 / UTM zone 51N",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235629972,
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 = (440720.000000,3751320.000000)
Pixel Size = (60.000000,-60.000000)
Corner Coordinates:
Upper Left ( 440720.000, 3751320.000) (122d21'31.79"E, 33d54'2.17"N)
Lower Left ( 440720.000, 3720600.000) (122d21'39.20"E, 33d37'24.77"N)
Upper Right ( 471440.000, 3751320.000) (122d41'27.92"E, 33d54'6.78"N)
Lower Right ( 471440.000, 3720600.000) (122d41'31.50"E, 33d37'29.33"N)
Center ( 456080.000, 3735960.000) (122d31'32.60"E, 33d45'46.17"N)
Band 1 Block=512x16 Type=Byte, ColorInterp=Gray
Then ran:
gdalwarp -t_srs "+proj=lcc +lon_0=110 +lat_0=10 +lat_1=25 +lat_2=47 +datum=WGS84" chen.tif warped.tif
Producing:
warmerda at gdal2200[18]% gdalinfo warped.tif
Driver: GTiff/GeoTIFF
Size is 576, 576
Coordinate System is:
PROJCS["unnamed",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.2572235629972,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]],
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 = (1120036.822687,2770670.127441)
Pixel Size = (58.977562,-58.977562)
Corner Coordinates:
Upper Left ( 1120036.823, 2770670.127) (122d21'52.12"E, 33d56'14.27"N)
Lower Left ( 1120036.823, 2736699.052) (122d19'1.37"E, 33d37'41.24"N)
Upper Right ( 1154007.898, 2770670.127) (122d44'6.91"E, 33d53'49.28"N)
Lower Right ( 1154007.898, 2736699.052) (122d41'11.15"E, 33d35'16.83"N)
Center ( 1137022.361, 2753684.590) (122d31'32.89"E, 33d45'45.92"N)
Band 1 Block=576x14 Type=Byte, ColorInterp=Gray
One interesting thing in your case was that the output file did *not* seem
to have WGS84 as the GEOGCS/DATUM/ELLIPSOID. That suggests there was some
sort of problem parsing the LCC projection definition properly but I didn't
seem to run into that.
Any chance the output file warped.tif already existed? I remember some
discussion of that as an issue in recent days, but I didn't dig into it
at the time.
If the problem persists for you, I would appreciate your:
o Verifying the problem with the latest GDAL from CVS.
o Submitting a bug report in bugzilla including a small input
file I can use.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list