Re: JPEG2000 and GEOTIFF query [message #61726] |
Wed, 30 July 2008 06:25  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Gaurav writes:
> I am working with large volume of geo-referenced data and would like
> to save the images that I have in JPEG2000 format. I have seen that
> one can preserve the geographic information when one uses proprietory
> softwares like ENVI, even in jp2 format. They even have a name: GeoJp2
> for it. My question is, can we create JPEG2000 images using IDL so
> that they preserve the geographic information? It is easily done in
> the case of TIFF images using the GEOTIFF tag. Is there something of
> the sort available for JPEG2000?
In the case of georeferenced JPEG images, ENVI simply writes
a separate TIFF World File containing the map information in ASCII
format. This files are simple to write and you can do it yourself:
http://www.omg.unb.ca/~jonnyb/processing/geotiff_tifw_format .html
They give these files a .jgw extension, so that if you open a JPEG
file, and have a file of the same name with this extension in the
same directory, it just opens and reads the map data from this file.
> And talking of TIFF, I would like to bring it to the notice of the
> powers-that-be at IDL that it would be very useful if they could
> modify the use of GEOTIFF keyword. Right now, if you obtain a sub-
> rectangle of a large TIFF image, the structure returned by GEOTIFF is
> exactly the same as it would be for the whole image. Would it not be
> much more convenient if, in the case of subset images, the GEOTIFF
> structure contains the geographic information about that small section
> of the image, viz, the new easting, northing values etc. Right now I
> have to do it on my own and I usually get confused offsetting the
> values for the sub-rectangle.
It would probably be more convenient, but normally this is where
well-written algorithms play a role. ;-)
And, anyway, the GEOTIFF information is associated with the entire
image, and the entire image is still present in the file when you
read a sub-set, so... It seems reasonable to me that it would be up
to the programmer to figure out what is going on. Given that you have
all the information you need in the GeoTiff structure and in the info
structure returned by the Query_TIFF function, it would be a lazy
programmer, indeed, who couldn't figure out how to assign a lat/lon
to a sub-set pixel. But maybe that's just me being cranky this
morning. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|