[Gdal-dev] Worldfile from SuperEdit + rotated images problems

Mateusz Łoskot mateusz at loskot.net
Thu Nov 10 12:44:55 EST 2005


Frank Warmerdam wrote:
> On 11/7/05, Mateusz Łoskot <mateusz at loskot.net> wrote:
> 
>>0.00000000000000 - x-scale
>>0.84666666666667 - rotation
>>0.84666666666667 - --//--
>>0.00000000000000 - y-scale
>>594958.12740300002000 - Easting and
>>373303.90045100002000 - Northing of the upper left pixel
> 
> 
> Mateusz,
> 
> The above would seem to imply that the "top left" corner
> of the raw TIFF file is the south-west corner, is that correct?
> 

Frank,
Thank you very much for your replay.
Yes, the top-left corner - in Poland CS92 - in south-west corner.


>>And here comes the problem. When I open test.tif in ArcExplorer or QGIS I
>>don't see anything.
>>Raster is not displayed but also I get no error message.
>>So it seems GeoTIFF output is broken here.
> 
> 
> Many applications do not support GeoTIFF files that are not
> north-up. 

Yes, I've had that in mind. Well, almost ;-)

 > QGIS uses GDAL to read the image, but may still not
> support files with non-zero rotational coefficients.  You would need
> to contact the QGIS team to deal with that.

Sure, I'll do it.

> I can't speak for ArcGIS.

My colleague uses ArcGIS 9 and it supports rotated images well.
But if I open my JPG/JGW test file it works well. Then, I use 
gdal_translate to translate this JPG/JGW to GeoTIFF and then ArcGIS 
displayes that new GeoTIFF not-rotated, but JPG is displayed correctly.


> You might want to try loading it in OpenEV which I know
> supports rotated images properly.

I'll try to do it tomorrow. Thanks.

 > It should change it to north up on the fly.
> 
> But if you want to "apply the rotation" or more accurately to
> "unrotate" the image you can use gdalwarp.
> 
> eg.
> 
> gdalwarp test.tif test_unrotated.tif

That's great, I've not idea I can use gdalwarp to "unrotate" images.
I'll test it tomorrow.

>>My questions are:
>>1. Is this worldfile (JGW) generated by SuperEdit correct?
> 
> 
> I presume so, though it is hard for me know.

I understand it.

>>2. If not, does anybody know what is this format used by SuperEdit?
>>3. Is there any way to rerotate rotated images so, then I could use 0.0
>>rotation components?
> 
> 
> My suggestion is gdalwarp'ing the image with the existing world file.
> But of course lots of image editing tools will provide 90 degree rotations.
> Photoshop, Gimp, ImageMagick, etc.

OK, as I said above, I'll test to gdalwarp my image.

Thanks Frank for your help.
I believe you don't mind I'll post on the list about results tomorrow.

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list