Skip to main content

Urgent help in creating a GeoTIFF file

2 replies [Last post]
kanika_jain
Offline
Joined: 2006-04-20
Points: 0

hi

i am a student and i am completely new to JAI & imageIO.
i have to write one module in my project where i can export a GeoTIFF image.i have the raster information in form of a PlanarImage and the map projection information for the geoTIFF in form of a text file.
In javax.media.imageIO.plugins.tiff there is one class GeoTIFFTagSet. I don't know how to use that class for creating any GeoTIFF or TIFF image.
i desperately need some sample codes for this
Please help me. I have to submit the work by 9th May.
Eagerly waiting for the reply

Regards
kanika

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Bryce L Nordgren

jai-imageio@javadesktop.org wrote on 05/02/2006 11:05:57 PM:

> hi
>
> i am a student and i am completely new to JAI & imageIO.
> i have to write one module in my project where i can export a
> GeoTIFF image.i have the raster information in form of a PlanarImage
> and the map projection information for the geoTIFF in form of a text
file.
> In javax.media.imageIO.plugins.tiff there is one class
> GeoTIFFTagSet. I don't know how to use that class for creating any
> GeoTIFF or TIFF image.
> i desperately need some sample codes for this
> Please help me. I have to submit the work by 9th May.
> Eagerly waiting for the reply

How easy this will be depends on what map projection your data is in,
whether the GeoTIFF format contains support for it, how many of the
parameters are "custom", and how much geospatial savvy you already have.

First, determine both your map projection and the parameters for the
projection.

Second, go to http://www.remotesensing.org/geotiff/spec/geotiffhome.html.
Determine whether your projection is supported. If not, reproject and
start again.

Third, determine whether your particular projection plus parameters
combination is "canned", or whether you need to explicitly specify your
parameters.

Fourth, if you need to specify parameters, learn what the parameter names
are in the spec.

Fifth, construct a viable set of GeoKeys according to the spec. Supply
these as metadata to the ImageIO writer. For an example of the reverse
operation, see the code Mike Nidel referred to.

If you're really interested in writing your own code, you need to have a
good understanding of the following:

1] The structure and contents of the EPSG geodetic database
(http://www.epsg.org/Geodetic.html)
2] The structure of the GeoTIFF data model.
3] The mapping of the EPSG concepts into GeoKeys.

Your other option is to use a predefined system which encapsulates this
understanding for you (e.g., Arc/INFO, GRASS, etc.) GeoTools is a
programming library and will require that you understand the EPSG database,
ISO 19111--Spatial Referencing by Coordinates, and OGC Grid Coverage
Exchange, as these are the constructs upon which it is built. This is not
exactly easier than rolling your own, as you must learn much of the same
things in different packaging. The learning will be the hard part.

In short, JAI/ImageIO does not attempt to understand or interpret the
geospatial information. It carries prepackaged metadata to and from the
file for you. You must supply this metadata to a software construct which
does attempt to understand and interpret it (or vice versa).

Bryce
PS: Unless you want to be beating your head against this problem until
Christmas, I'd suggest using an external format converter. It sounds like
you're already producing a "World File", which external packages should be
able to read.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

Robert Engels

I suggest start by reading through the forums for others that may have already answered this.

Maybe you should have started sooner?

Sounds to me like you're wasting your money on school... MCD is hiring !

-----Original Message-----
From: jai-imageio@javadesktop.org [mailto:jai-imageio@javadesktop.org]
Sent: Wednesday, May 03, 2006 12:06 AM
To: interest@jai-imageio.dev.java.net
Subject: [JAI-IMAGEIO] Urgent help in creating a GeoTIFF file

hi

i am a student and i am completely new to JAI & imageIO.
i have to write one module in my project where i can export a GeoTIFF image.i have the raster information in form of a PlanarImage and the map projection information for the geoTIFF in form of a text file.
In javax.media.imageIO.plugins.tiff there is one class GeoTIFFTagSet. I don't know how to use that class for creating any GeoTIFF or TIFF image.
i desperately need some sample codes for this
Please help me. I have to submit the work by 9th May.
Eagerly waiting for the reply

Regards
kanika
[Message sent by forum member 'kanika_jain' (kanika_jain)]

http://forums.java.net/jive/thread.jspa?messageID=109647

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net