[FWTools] lat/lon cursor display resolution

Frank Warmerdam fwarmerdam at gmail.com
Thu May 19 14:37:09 EDT 2005


On 5/12/05, Jon Becker <jon0x0 at yahoo.com.au> wrote:
> Hello,
> 
> This seems to be a possible bug.
> I am using FWTools 0.9.8.  I have a custom script attached to a menu item which loads a number of
> GeoJPEG images and mosaics them.  If I run this script right after starting the application, the
> lat/long display at the bottom of the screen (tracking tool?) has only 2 decimal places of
> resolution.  Changing the lat/long display preferences from the menu has no effect at this point.
> If I load say a GeoTIFF file first from the file/open menu, the lat/long display correctly changes
> to 7 decimal places of resolution.  If I then run my script the lat/long display stays at 7
> decimal places.  If I load this GeoTIFF after running the script, the resolution stays at 2
> decimal places.
> There is nothing in the script which changes the preferences, and they are set to geodetic /
> ddd.ddddddd
> 
> Do you have a suggestion for something I can add / change to make this work correctly?

Jon,

First, I think that your GeoJPEG file likely does not have any 
coordinate system information recognised by OpenEV (really by
GDAL).  You might want to check with gdalinfo.  If this is the case
then OpenEV cannot reproject to lat/long to report in geodetic
format.  In stead it will try to report in georeferenced coordinates 
assuming there is a world file. 

If the world file contains geodetic coordinates, then OpenEV
will report in decimal degrees, but it doesn't really know they are
degrees so nothing special is done to convert to DMS format. 

Also, OpenEV tries to report "small" georeferenced values 
(likely to be geodetic decimal degrees) with more precision
than "big numbers" which it assumes are something like meters
so a couple decimal places is pretty good. 

The net result, I think, is that if you want nice DMS reporting
you will need to associate a coordinate system with your image. 
If the image is already in lat/long, then doing:

 gdal_translate in.jpg out.tif -a_srs WGS84 

might do the trick. 

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 FWTools mailing list