[FWTools] ESRI JPG/ with JGW files conversion
Frank Warmerdam
warmerdam at pobox.com
Fri Aug 18 00:04:37 EDT 2006
Shaun Kolomeitz wrote:
> Dear Listers,
>
> I have struck a problem converting a JPG file with an ESRI world file (JGW) and trying to maintain the position of the image in "real world" coordinates.
> When I do a GDALINFO on the images for example -
>
> Z:\image\9541\0.6>gdalinfo 9541-1122.jpg
> Driver: JPEG/JPEG JFIF
> Size is 1608, 3227
> Coordinate System is `'
> Corner Coordinates:
> Upper Left ( 0.0, 0.0)
> Lower Left ( 0.0, 3227.0)
> Upper Right ( 1608.0, 0.0)
> Lower Right ( 1608.0, 3227.0)
> Center ( 804.0, 1613.5)
> Band 1 Block=1608x1 Type=Byte, ColorInterp=Red
> Band 2 Block=1608x1 Type=Byte, ColorInterp=Green
> Band 3 Block=1608x1 Type=Byte, ColorInterp=Blue
>
> This is despite a JGW (world file) existing.
> As such when I try to translate the image it loses the appropriate conversion parameters listed in the JGW file.
>
> Any suggestions on how I could convert these files using GDAL commands ?
Shaun,
This *should* work.
For instance:
warmerda at gdal2200[277]% ls -l utm*
-rw-r--r-- 1 warmerda users 98 Sep 11 2005 utm.jgw
-rw-r--r-- 1 warmerda users 104905 May 1 2001 utm.jpg
warmerda at gdal2200[278]% gdalinfo utm.jpg
Driver: JPEG/JPEG JFIF
Size is 512, 512
Coordinate System is `'
Origin = (440720.000000,3751320.000000)
Pixel Size = (60.00000000,-60.00000000)
Corner Coordinates:
Upper Left ( 440720.000, 3751320.000)
Lower Left ( 440720.000, 3720600.000)
Upper Right ( 471440.000, 3751320.000)
Lower Right ( 471440.000, 3720600.000)
Center ( 456080.000, 3735960.000)
Band 1 Block=512x1 Type=Byte, ColorInterp=Gray
Is there any chance that your .jgw files name is actually different
in some subtle way - perhaps one of the "1"s is an "l" or something
like that?
Is it possible that Z: is a unix network drive and is case
sensitive? If so try renaming everything to be lower case.
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 | President OSGF, http://osgeo.org
More information about the FWTools
mailing list