comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: JPEG2000 and GEOTIFF query
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: JPEG2000 and GEOTIFF query [message #61726] Wed, 30 July 2008 06:25 Go to next message
David Fanning is currently offline  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.")
Re: JPEG2000 and GEOTIFF query [message #61909 is a reply to message #61726] Sat, 02 August 2008 03:06 Go to previous message
Gaurav is currently offline  Gaurav
Messages: 50
Registered: January 2007
Member
Thanks indeed for your pointers. As always, they have been quite
helpful. Even though my question was specifically for georeferenced
JPEG2000 images, the information in the webpage whose link was
provided by you, coupled with the information given here:

http://students.ee.sun.ac.za/~riaanvdd/jpeg2000.htm

makes quite a bit of sense. It says:

"The GeoJP2™ format is essentially a degenerate GeoTIFF file (with no
image data) embedded in a UUID box in the JPEG2000 file to provide
coordinate system information and a mapping between pixel coordinates
and georeferenced coordinates."

So, I tried playing around with UUID boxes in JPEG2000, but could not
have much success- primarily due to lack of examples. Could anyone
please point me to a good example where
a georeferenced JPEG2000 has been created-or maybe some substantial
chunk of data has been stored in UUID boxes.

And, of course, you are right that I have no right to be called a
programmer if I am not capable of doing such a simple task as
computing offsets-and you can say that even on your 'non-cranky'
mornings. But all I wanted to say was that when using the subrectangle
keyword returns a smaller portion of the image, the corresponding
GEOTIFF structure should also return information corresponding to that
subset of image. I was just seeking to find if anyone else feels the
same way. It is fine with me if it is fine with the majority. But in
my "Perfect World", GEOTIFF would work in the way I described
earlier. ;)

Regards
Gaurav
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to save the console output as a ascii or text file in IDL
Next Topic: Re: problem with online help IDL v7.0

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 02:02:01 PDT 2025

Total time taken to generate the page: 2.55819 seconds