[gdal-dev] How to create a fake GeoTIFF for GeoJP2

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Sat May 12 15:25:42 EDT 2012


Hi,

I have Geotiff files and a fast program for compressing images into JPEG2000.
However, this program does not add GeoJP2 georeferencing into JPEG2000 files and
I would like to include it.  I have also a program that can add GeoTIFF as an
UUID box into an existing JPEG2000 file.

What I miss is the GeoTIFF to embed into JP2 file. It should be a 1 pixel sized
GeoTIFF with the tags from the original image. Have I understood it right when I
believe that I can create if with gdal_translate simply using 

gdal_translate -srswin 0 0 1 1 original.tif to_be_embedded.tif?

This is the gdalinfo from a geotiff that I took out from the UUID box of a
GeoJP2 image. It seems to be exactly just the topleft pixel of the image.

gdalinfo tiff_from_JPEG2000_UUID.tif
Driver: GTiff/GeoTIFF
Files: geo_tiff.tif
Size is 1, 1
Coordinate System is:
PROJCS["NAD27 / UTM zone 11N",
    GEOGCS["NAD27",
        DATUM["North_American_Datum_1927",
            SPHEROID["Clarke 1866",6378206.4,294.9786982139006,
                AUTHORITY["EPSG","7008"]],
            AUTHORITY["EPSG","6267"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4267"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-117],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","26711"]]
Origin = (440720.000000000000000,3751320.000000000000000)
Pixel Size = (60.000000000000000,-60.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  440720.000, 3751320.000) (117d38'28.21"W, 33d54' 8.47"N)
Lower Left  (  440720.000, 3751260.000) (117d38'28.19"W, 33d54' 6.52"N)
Upper Right (  440780.000, 3751320.000) (117d38'25.87"W, 33d54' 8.48"N)
Lower Right (  440780.000, 3751260.000) (117d38'25.86"W, 33d54' 6.53"N)
Center      (  440750.000, 3751290.000) (117d38'27.03"W, 33d54' 7.50"N)
Band 1 Block=1x1 Type=Byte, ColorInterp=Gray



More information about the gdal-dev mailing list