01: package org.geotiff.image.jai;
02:
03: /*
04: * JAI GeoTIFF extensions. Copyright (c) 2000 Niles Ritter.
05: */
06: import org.libtiff.jai.codec.XTIFFDirectory;
07: import org.libtiff.jai.operator.XTIFFDescriptor;
08:
09: /**
10: * The GeoTIFFDescriptor is a single class that is both an OperationDescriptor
11: * and a RenderedImageFactory for the overridden "tiff" operation.
12: *
13: * @author Niles Ritter
14: */
15:
16: public class GeoTIFFDescriptor extends XTIFFDescriptor {
17:
18: /**
19: * The public Constructor.
20: */
21: public GeoTIFFDescriptor() {
22: super ();
23: }
24:
25: /**
26: * A convenience method for registering the "geotiff" methods into JAI. This
27: * needs only be called once before using GeoTIFF methods.
28: */
29: public static void register() {
30: // Create the objects
31: GeoTIFFDescriptor odesc = new GeoTIFFDescriptor();
32: XTIFFDescriptor.register(odesc);
33:
34: // Tell XTIFF to create a GeoTIFF directory instead of XTIFF.
35: XTIFFDirectory.setFactory(new GeoTIFFFactory());
36: }
37: }
|