Programming with JViews Maps > Introducing the Main Classes > Raster Image Management > The IlvRasterProperties Class

The IlvRasterProperties class collects information about the raster image to be tiled and the image to be displayed. This information comprises:

To create and setup raster properties, you can write, for example:

IlvAdjustableDelegateColorModel csm=new IlvAdjustableDelegateColorModel(myColorModel);
IlvRasterProperties p=new IlvRasterProperties(csm);
p.setX(xmin);
p.setY(ymax);
p.setWidth(xmax-xmin);
p.setHeight(ymin-ymax);
p.setColumnPixelCount(nbCols);
p.setLinePixelCount(nbRows);
p.setTransparentColorIndex(noDataValue);
p.setHorizontalPixelDensity(p.getWidth() / p.getColumnPixelCount());
p.setVerticalPixelDensity(p.getHeight() / p.getLinePixelCount());

In the example above, the IlvAdjustableDelegateColorModel is needed to provide brightness, saturation and contrast settings for the user.

If the variables xmin/xmax and ymin/ymax are in longitudes, latitudes in radians, and the attached coordinate system is IlvGeographicCoordinateSystem, the reader uses the WGS84 transformation to be coherent with these raster properties.

 IlvCoordinateTransformation.CreateTransformation(
     IlvGeographicCoordinateSystem.KERNEL,
     IlvGeographicCoordinateSystem.WGS84).getTransform();