1

If i have picture with this metadata in exif header:

Size is 4000, 3000
Coordinate System is `'
Metadata:
  EXIF_ApertureValue=(3.625)
  EXIF_ColorSpace=1
  EXIF_ComponentsConfiguration=0x1 0x2 0x3 00
  EXIF_CompressedBitsPerPixel=(5)
  EXIF_CustomRendered=0
  EXIF_DateTime=2015:09:09 15:27:28
  EXIF_DateTimeDigitized=2015:09:09 15:27:28
  EXIF_DateTimeOriginal=2015:09:09 15:27:28
  EXIF_DigitalZoomRatio=(1)
  EXIF_ExifVersion=0230
  EXIF_ExposureBiasValue=(0)
  EXIF_ExposureMode=0
  EXIF_ExposureTime=(0.0005)
  EXIF_FileSource=0x3
  EXIF_Flash=16
  EXIF_FlashpixVersion=0100
  EXIF_FNumber=(3.5)
  EXIF_FocalLength=(4.5)
  EXIF_FocalPlaneResolutionUnit=2
  EXIF_FocalPlaneXResolution=(16393.4)
  EXIF_FocalPlaneYResolution=(16393.4)
  EXIF_GPSAltitude=(91.8)
  EXIF_GPSAltitudeRef=00
  EXIF_GPSDateStamp=2015:09:09
  EXIF_GPSLatitude=(45) (18) (3.564)
  EXIF_GPSLatitudeRef=N
  EXIF_GPSLongitude=(19) (48) (19.842)
  EXIF_GPSLongitudeRef=E
  EXIF_GPSMapDatum=WGS-84
  EXIF_GPSStatus=A
  EXIF_GPSTimeStamp=(14) (27) (29)
  EXIF_GPSVersionID=0x2 0x3 00 00
  EXIF_ImageDescription=                               
  EXIF_Interoperability_Index=R98
  EXIF_Interoperability_Version=0x30 0x31 0x30 0x30
  EXIF_ISOSpeedRatings=800
  EXIF_Make=Canon
  EXIF_MakerNote=
  EXIF_MaxApertureValue=(3.625)
  EXIF_MeteringMode=5
  EXIF_Model=Canon PowerShot SX280 HS
  EXIF_Orientation=1
  EXIF_PixelXDimension=4000
  EXIF_PixelYDimension=3000
  EXIF_Related_Image_Length=3000
  EXIF_Related_Image_Width=4000
  EXIF_ResolutionUnit=2
  EXIF_SceneCaptureType=0
  EXIF_SensingMethod=2
  EXIF_ShutterSpeedValue=(10.9688)
  EXIF_UserComment=
  EXIF_WhiteBalance=1
  EXIF_XResolution=(180)
  EXIF_YCbCrPositioning=2
  EXIF_YResolution=(180)
Image Structure Metadata:
  COMPRESSION=JPEG
  INTERLEAVE=PIXEL
  SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 3000.0)
Upper Right ( 4000.0,    0.0)
Lower Right ( 4000.0, 3000.0)
Center      ( 2000.0, 1500.0)
Band 1 Block=4000x1 Type=Byte, ColorInterp=Red
  Overviews: 2000x1500, 1000x750, 500x375
  Image Structure Metadata:
    COMPRESSION=JPEG
Band 2 Block=4000x1 Type=Byte, ColorInterp=Green
  Overviews: 2000x1500, 1000x750, 500x375
  Image Structure Metadata:
    COMPRESSION=JPEG
Band 3 Block=4000x1 Type=Byte, ColorInterp=Blue
  Overviews: 2000x1500, 1000x750, 500x375
  Image Structure Metadata:
    COMPRESSION=JPEG

How should i format appropriate .jgw file for this picture?

  • If it is not an orthophoto then no use of jgw. Instead use a point and the image can be an attribute. – Zoltan Sep 21 '15 at 7:30
  • Yes it is ortophoto, pictures have been taken with UAV.I need .jgw file because geoserver uses jpg + jgw files for stiching images(Mosaicing) – Milos Miletic Sep 21 '15 at 7:36
  • 1
    I've never seen world file (e.g. jgw) in wgs84, I suppose your orthophoto can't be in wgs84. You should convert image center to a CRS (GPSLatitude, GPSLongitude), probably it is the image center, from resolution may be you can find out the pixel size on the field. The jgw contains six values in separate row 1st row x pixel size on field, 2nd 0, 3rd 0, 4th -1 * y pixel size on field, 5th upper right corner x, 6th upper right corner y. I supposed there is no rotation, image parallel to the CRS, otherwise 2nd and 3rd rows are not zeros. – Zoltan Sep 21 '15 at 7:48
  • Can you explain me a bit closer how can i calculate pixel size on the field? Thanks Zoltan! – Milos Miletic Sep 21 '15 at 7:59
  • 1
    Sorry upper left is the correct. You may have an other chance to create the world file if you know the coordinates at least three point on the picture. There are several georeferencing tool, e.g. QGIS. – Zoltan Sep 21 '15 at 12:12
3

I don't see anything in that EXIF that could possibly provide enough information to construct a world file.

As Zoltan pointed out in the comments, you can might be able figure out the pixel size from geometry (given camera position in 3D, and altitude above ground), if you are willing to make the assumption that the camera is facing straight down (normal to the earth).

However unless you have some information about which direction is North in the image, you won't be able to determine the rotation of the image.

If that isn't obvious, consider taking two images from the same location, both with the camera facing straight down. One has the left edge of the camera facing North, the other has the camera "spun" about an axis that is normal to the earth's surface, such that the same left edge is now facing South.

Both images will look the same, except one will be "upside down". They'll have identical EXIF data (except for some time information - all the geospatial bits will be the same).

So you need more information than is extractable from EXIF.

  • But if we assume that it is pointing north can you tell me how can i get values: A: pixel size in the x-direction in map units/pixel E: pixel size in the y-direction in map units, almost always negative from attributes in this exif header? Thanks for your help! – Milos Miletic Sep 21 '15 at 10:06
  • Are you also willing to make the assumption that the earth is flat across the field of view, and that the camera is perfectly orthogonal to that flat earth? If not, are you willing to accept the errors associated with the variations? – BradHards Sep 21 '15 at 10:14
  • Yeah, i can make assumption that earth is flat across the field of view and that camera is orthogonal to the earth.How would you create .jgw file based on these assumptions from this exif? – Milos Miletic Sep 21 '15 at 10:37
  • You can't get .jgw from that EXIF. You might be able to get the pixel sizes but you can't get the rotation information or corner position. – BradHards Sep 21 '15 at 10:46
  • Is this attribute the thing i am missing in Exif header - ImgDirection ? – Milos Miletic Sep 21 '15 at 11:33
1

The Exif Specification provides for the following Tags

0x0010  16  GPSInfo Exif.GPSInfo.GPSImgDirectionRef Ascii   Indicates the reference for giving the direction of the image when it is captured. "T" denotes true direction and "M" is magnetic direction.
0x0011  17  GPSInfo Exif.GPSInfo.GPSImgDirection    Rational    Indicates the direction of the image when it was captured. The range of values is from 0.00 to 359.99.

If your Drone Software can populate that at the time the image was taken, you will have what you need

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.