Skip to main content

Geotiff without geotools

3 replies [Last post]
Joined: 2010-05-30


I am currently working with multiband TIFF images, which include geotiff metadata. My objetive is to read some tags whith relevant info like: DATUM, projection, coordinates, resolution, zone... in order to georreference my images.

So: Can I find all these data using this code?

At the same time, I have loaded my image in "libgeoGUI" application to see geotiff info. Comparing it

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-07-10


I did google research for the first answer because I am interested
in extending my knowledge. Now it is up to you to do some research.
As I mentioned above:

"There are several implementation of wrapping MetaInfo classes
to parse the tag values in the web. Try google."

You can google and find some additional classes. e.g. you can
get wrapper classes to the MetaInfo that can give the textual
representation. These functionality is not part of imageio or
ja-imageio. That is what I saw doing a short google request.

Joined: 2006-07-10

The information is already there:

GeoKeyDirectory, GeoAsciiParams

ImageIO does not provide a class to analyse this values.
There are several implementation of wrapping MetaInfo classes
to parse the tag values in the web. Try google.

e.g. the GeoKeyDirectory is organized in rows of 4 values.
I can read from your output below:

1, 1, 0, 5 // 1 = info tag, revision 1.0, 5 further keys
1024, 0, 1, 1 // 1024 = GTModelTypeGeoKey value=1 (ModelTypeProjected)
1025, 0, 1, 1 // 1025 = GTRasterTypeGeoKey value=1 (RasterPixelIsArea)
2052, 0, 1, 9001 // 2052 = GeogLinearUnitsGeoKey value=9001 (Linear_Meter)
2054, 0, 1, 9102 // 2054 = GeogAngularUnitsGeoKey value=9102 (Angular_Arc_Second)
3072, 0, 1, 32719 // 3072 = ProjectedCSTypeGeoKey value=32719 (PCS_WGS84_UTM_zone_19S)

References I found for reading:

Kind regards,

Joined: 2010-05-30

Hi Marco, thanks for reply.

How could I generate a data description of my geotiff metadata instead of showing numbers?

That is to say, I prefer to show "PCS_WGS84_UTM_zone_19S", "Linear_Meter"... instead of "32719" or ..."9001"

There must be a class in Java to make this mapping: please could you tell me which?

Thank you!