Details
Description
We need a WorldImageReader class which extends ImageReader and wraps an other ImageReader, adding the capability to read TFW and PRJ files associated to the usual image files (PNG, JPEG, TIFF, etc). This WorldImageReader will accept inputs only of type File or URL (more types, especially streams, may be added later). Given the URL to the image file, WorldImageReader checks if a file of the same name except for the extension (".prj", etc.) exists. If such file is found, its content is read and used for filling the nodes in the metadata defined by the GEOTK-55 task. Reading of the image itself is delegated to the wrapped ImageReader, which is usually provided by the standard JDK.
With this approach, spatial metadata are injected automatically in every PNG, JPEG or TIFF images to be read, without the need for the user to use a specific API. However a WorldImageReader for the PNG format (for instance) should probably be ordered after the standard PNG reader (i.e. give precedence to the standard PNG reader; the wrapper would be used only if the user asked explicitly for a reader accepting a File or URL input instead than the usual ImageInputStream), at least for now... Giving precedence to the standard reader may be safer for avoiding to surprise the user.
