[Gdal-dev] gdalwarp for north-up rotation seems to eat geo
information
Dan Rizzo
gdangit at gmail.com
Thu Jun 7 15:59:41 EDT 2007
Hello
I am trying to rotate some GeoTiff images to be "North Up". When I run
gdalwarp, it seems to eat the Geo Transform and other geo information.
The input image, which we'll call in.tif, has gdalinfo which looks like
this:
Driver: GTiff/GeoTIFF
Size is 27552, 30080
Coordinate System is:
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"]]
GeoTransform =
<lon offset> <scale related> <nonzero rotation>
<lat offset> <nonzero rotation> <scale related>
Metadata:
tons of key-value pairs here.
Corner Coordinates:
listed in Lat/Long
I'd like to have the same type of info in the output file, but with the
rotations both zero (north up)
I tried:
gdalwarp in.tif out.tif
this results in the out.tif having no geo information, where gdalinfo
outputs:
Driver: GTiff/GeoTIFF
Size is 28141, 29577
Coordinate System is `'
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0,29577.0)
Upper Right (28141.0, 0.0)
Lower Right (28141.0,29577.0)
Center (14070.5,14788.5)
Band 1 Block=28141x1 Type=UInt16, ColorInterp=Gray
The problems as I see it are:
1) the coordinate system is gone in the output
2) the geo transform info is gone (including pixel scale and coordinate
system offset)
3) the corners are now expressed in pixel values (because of #2?)
4) all the metadata name/value pairs are gone
I tried many other variations, including specifying the target SRS values,
and the source and target SRS, but I must confess I'm not sure I got this
exactly right:
gdalwarp -s_srs "+proj=latlong +datum=WGS84" -t_srs "+proj=latlong
+datum=WGS84" -multi in.tif out.tif
I also tried adding "+north" to the target projection, which I saw on this
list somewhere.
Can anyone explain what I am doing wrong?
Thanks in advance!
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070607/e76055d1/attachment.html
More information about the Gdal-dev
mailing list