| BlueSpray - Help © SchoonerTurtles, Inc. 2012-2015
Introduction
Contents
Getting Started
Download
Navigating
Tutorials
Scripting
Advanced
About
| # Class STToRaster Extends STTransform Process and static functions to render rasters from layers and geometries. This class has two basic operations; rendering a raster for drawing to the screen and converting vector data into a raster with the raster pixel values from the attributes related with a layer. The latter can be used to convert vector data into rasters for analysis. Inputs include both STItems and STLayers As a static class, it provides a set of utilities to render raster data from layers and geometies. NewRaster() - creates a destination raster to draw into NewView() - creates a view to draw into based on the raster from NewRaster() jjg - should pass in the background color Copyright, SchoonerTurtles LLP, 2009 @author Jim Graham #### Static Functions
Returns | Function | Throws
--- | --- | ---
| AddCounts(STLayer TheItem,STRaster TheRaster) | Exception
STRaster | FromAttribute(STLayer TheItem,int AttributeColumnIndex, ATTRIBUTE_CALC TheCalc,STRaster TheRaster) | Exception
STRaster | Paint(STArea TheRegion,double PixelRefWidth, PIXEL_TYPE PixelType,Color BackgroundColor, STStyle TheStyle,boolean HasMask) | Exception
## Static Functions ### AddCounts(STLayer TheItem,STRaster TheRaster) Exception Add the number of points that appear in each pixel in the specified raster. Parameters: ThePointLayer TheRaster Throws: Exception ### STRaster FromAttribute(STLayer TheItem,int AttributeColumnIndex, ATTRIBUTE_CALC TheCalc,STRaster TheRaster) Exception Add the number of points that appear in each pixel in the specified raster. Parameters: ThePointLayer TheRaster Throws: Exception ### STRaster Paint(STArea TheRegion,double PixelRefWidth, PIXEL_TYPE PixelType,Color BackgroundColor, STStyle TheStyle,boolean HasMask) Exception Renders a single area in a region into a raster. This is required to keep the size of the rasters relatively small for regions like the United States or Alaska where the alutian islands are on the other side of the international date line so a raster containing one of these regions would cover the entire world. Parameters: TheRegion - The region to draw into the raster AreaIndex - The area within the region to draw PixelRefWidth - the width of each pixel PixelType - GRAY or RGB BackgroundColor - Background color for the raster TheStyle - style to use to draw raster. This includes the antialiasing setting