GDAL_TRANSLATE Assumes Picture is Orientated North?
The right order of coordinates to assign to the input image is: ulx uly lrx lry
, i.e. upper-left x and y, lower-right x and y, as reported in gdal_translate
documentation:
-a_ullr ulx uly lrx lry:
Assign/override the georeferenced bounds of the output file. This assigns georeferenced bounds to the output file, ignoring what would have been derived from the source file.
so, considering signs and absolute values of your coordinates, I think that you need simply to switch the two pairs of coordinates after the -a_ullr
option:
gdal_translate -a_ullr -76.43183999600483 38.148231283935985 -76.43036800559511 38.14807271147146 IMG028.jpg img28.tif
GDAL uses a combination of the image projection and any extra parameters such as skew/rotation to determine how an image should be oriented. Those extra parameters can be embedded in the file if the format supports it (like GeoTIFF) or in a separate world file if it not.
The skew or rotation could be coming from information stored in world files along with your jpeg images (usually .wld or .jpgw). Or, you could be missing those files (the images should be rotated but they aren't).
It would also be helpful to assign the proper projection. It may not be what is causing the distortion, but it would be something to rule out.
edit
You may be able to create the world files but you will need to know the pixel resolution and calculate the skew. Your world file should be named exactly the same as the image, but with a different exstention (.wld or .jpgw) and have the following lines:
- pixel resolution * cos(rotation angle)
- -pixel resolution * sin(rotation angle)
- -pixel resolution * sin(rotation angle)
- -pixel resolution * cos(rotation angle)
- upper left x
- upper left y
That may be too difficult given your images and available data. Another approach would be to supply ground control points, with the -gcp
option, for each corner of the image and then use gdalwarp
to apply them. Essentially, you could georectify your images instead.