[gdal-dev] JPEG file with ESRI world file .jpgw but geotransform not established
Markus Neteler
neteler at osgeo.org
Sun Jan 26 13:30:37 PST 2020
Hi,
Likely I am overlooking something but I don't see why this fails:
I try to properly read some of these
Cartes topographiques 1:50000 du Nord de la Tunisie de 1943
https://www.sigterritoires.fr/index.php/cartes-topographiques-150000-du-nord-de-la-tunisie-de-1943/
Example:
wget http://www.nasca.ovh/downloads/tunisie/feuille20.zip
unzip feuille20.zip
# content:
txu-pclmaps-oclc-6540922-tunis-20.jgwx
txu-pclmaps-oclc-6540922-tunis-20.jpg
txu-pclmaps-oclc-6540922-tunis-20.jpg.aux.xml
gdalinfo txu-pclmaps-oclc-6540922-tunis-20.jpg
Driver: JPEG/JPEG JFIF
Files: txu-pclmaps-oclc-6540922-tunis-20.jpg
txu-pclmaps-oclc-6540922-tunis-20.jpg.aux.xml
Size is 5735, 3964
Coordinate System is:
PROJCS["NW Africa Grid",
GEOGCS["GCS_NTF",
DATUM["Nouvelle_Triangulation_Francaise",
SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936265]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic_1SP"],
PARAMETER["False_Easting",1000000.0],
PARAMETER["False_Northing",500000.0],
PARAMETER["Central_Meridian",0.0],
PARAMETER["Scale_Factor",0.9994],
PARAMETER["Latitude_Of_Origin",34.0],
UNIT["Meter",1.0]]
Metadata:
EXIF_BitsPerSample=8 8 8
EXIF_ColorSpace=65535
EXIF_Compression=1
EXIF_DateTime=2014:10:08 15:15:15
EXIF_ExifVersion=0221
EXIF_Make=i2s Digibook Scanner
EXIF_Model=Suprascan A0 14000 RGB
EXIF_Orientation=1
EXIF_PhotometricInterpretation=2
EXIF_PixelXDimension=5735
EXIF_PixelYDimension=3964
EXIF_PlanarConfiguration=1
EXIF_ResolutionUnit=2
EXIF_SamplesPerPixel=3
EXIF_Software=Adobe Photoshop CS5 Macintosh
EXIF_XResolution=(300)
EXIF_YResolution=(300)
Image Structure Metadata:
COMPRESSION=JPEG
INTERLEAVE=PIXEL
SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 3964.0)
Upper Right ( 5735.0, 0.0)
Lower Right ( 5735.0, 3964.0)
Center ( 2867.5, 1982.0)
Band 1 Block=5735x1 Type=Byte, ColorInterp=Red
Overviews: 2868x1982, 1434x991, 717x496, 160x111
Image Structure Metadata:
COMPRESSION=JPEG
Band 2 Block=5735x1 Type=Byte, ColorInterp=Green
Overviews: 2868x1982, 1434x991, 717x496, 160x111
Image Structure Metadata:
COMPRESSION=JPEG
Band 3 Block=5735x1 Type=Byte, ColorInterp=Blue
Overviews: 2868x1982, 1434x991, 717x496, 160x111
Image Structure Metadata:
COMPRESSION=JPEG
--> Corner Coordinates: not recognized properly.
Using the graphical GPC tool of GRASS GIS
(https://grass.osgeo.org/grass78/manuals/wxGUI.gcp.html)
and exporting the map to GeoTIFF + gdal_translate to JPG with World
file I obtained a quite similar result with working geotransform:
gdalinfo testmap_in_grass_gis.jpg
Driver: JPEG/JPEG JFIF
Files: testmap_in_grass_gis.jpg
testmap_in_grass_gis.jpg.aux.xml
testmap_in_grass_gis.wld
Size is 5821, 4104
Coordinate System is:
PROJCS["NW Africa Grid",
GEOGCS["clark80IGN",
DATUM["Nouvelle_Triangulation_Francaise",
SPHEROID["Clarke_1880_IGN_France",6378249.2,293.466021294,
AUTHORITY["EPSG","7011"]],
AUTHORITY["EPSG","6275"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic_1SP"],
PARAMETER["latitude_of_origin",34],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",0.9994],
PARAMETER["false_easting",1000000],
PARAMETER["false_northing",500000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (1878254.000000000000000,862484.000000000000000)
Pixel Size = (7.000000000000000,-7.000000000000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_SOFTWARE=GRASS GIS 7.8.3dev with GDAL 2.3.2
Image Structure Metadata:
COMPRESSION=JPEG
INTERLEAVE=PIXEL
SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left ( 1878254.000, 862484.000) ( 9d51'36.99"E, 36d53'11.62"N)
Lower Left ( 1878254.000, 833756.000) ( 9d49'45.94"E, 36d37'44.47"N)
Upper Right ( 1919001.000, 862484.000) ( 10d18'53.03"E, 36d51' 1.77"N)
Lower Right ( 1919001.000, 833756.000) ( 10d16'56.93"E, 36d35'34.99"N)
Center ( 1898627.500, 848120.000) ( 10d 4'18.31"E, 36d44'23.98"N)
Band 1 Block=5821x1 Type=Byte, ColorInterp=Red
NoData Value=255
Overviews: 2911x2052, 1456x1026, 728x513
Image Structure Metadata:
COMPRESSION=JPEG
Band 2 Block=5821x1 Type=Byte, ColorInterp=Green
NoData Value=255
Overviews: 2911x2052, 1456x1026, 728x513
Image Structure Metadata:
COMPRESSION=JPEG
Band 3 Block=5821x1 Type=Byte, ColorInterp=Blue
NoData Value=255
Overviews: 2911x2052, 1456x1026, 728x513
Image Structure Metadata:
COMPRESSION=JPEG
I am using
GDAL 2.3.2, released 2018/09/21
on Fedora 31.
Now, why is the original file not properly recognized?
Thanks for a hint,
Markus
More information about the gdal-dev
mailing list