BlueSpray - Help
© SchoonerTurtles, Inc. 2012-2015

Introduction
Contents
Getting Started
Download
Navigating
Tutorials
Scripting
Advanced
About

Available Packages

Below are the packages that contain classes with functions that are avialable for scripting

  • App - Manages the overall application including project data.
  • Base - Basic classes to support the test of the program. Includes access to content in objects.
  • File - Classes for reading and writing to files.
  • IO - Includes classes to access common network, file, and database data (Unfinished).
  • Painter -
  • PointTransform -
  • Pyramid -
  • Raster - Raster classes and the most basic raster transforms.
  • RasterExtension - Specialized raster transforms.
  • RasterTransform - Additional commonly used raster transforms.
  • SRS - Spatial Reference System classes and projectors.
  • Scene - Classes for layers and the scenes they are contained in.
  • Symbol - Symbology including styles.
  • Table - Classes for accessing data in tables, including attributes in layers.
  • Transform - General purpose transforms (work on various data types).
  • Utility - Miscelleneous utility classes and functions.
  • VectorExtensions - Specialized vector transforms.
  • VectorTransform - Basic vector transforms.

Available Functions

Below is a list of the functions that are available from BlueSpray.These functions are going to be placed under 'controlled change' where developers will be notified at least a year in advance before they change. If you see functions you would recommend changes to or would like to see additional functions added to this list, please contact SchoonerTurtles.

App Package

STApp

Static Functions

ReturnsFunctionThrows
STContent LockContentFromTreePath(String TheTreePath,float WaitSeconds,boolean RepaintTree) Exception

Base Package

STBase

Object Functions

ReturnsFunctionThrows
Object clone()  
String toString()  

STBounds

Object Functions

Inherited From: STBase
ReturnsFunctionThrows
ClipTo(STBounds TheClip)  
boolean Contains(STBounds TheTarget)  
Expand(double DeltaX,double DeltaY,double DeltaZ)  
double GetXMax()  
double GetXMin()  
double GetYMax()  
double GetYMin()  
double GetZMax()  
double GetZMin()  
boolean In(double RefX,double RefY,double RefZ,double Tolerance)  
Include(STBounds TheBounds)  
Include(double NewX,double NewY)  
Move(double DeltaX,double DeltaY,double DeltaZ)  
boolean Overlaps(STBounds TheBounds)  
  STBounds()  
  STBounds(double NewX,double NewY,double NewWidth,double NewHeight)  
SetXMax(double New)  
SetXMin(double New)  
SetYMax(double New)  
SetYMin(double New)  
SetZMax(double New)  
SetZMin(double New)  

STReport

Static Functions

ReturnsFunctionThrows
boolean Error(Exception TheException)  
boolean Error(String Message,Throwable TheException)  

File Package

STFileManager

Static Functions

ReturnsFunctionThrows
ConvertFile(String InputFile,String OutputFile) Exception
LoadFromFile(String FilePath,STBase TheObject) Exception
LoadFromFile(String FilePath,STBase TheObject,
     boolean ShowSettingsDialogs)
Exception
SaveToFile(String FilePath,STBase TheObject) Exception
SaveToFile(String FilePath,STBase TheObject,boolean ShowDialogs) Exception

IO Package

STIOManager

Static Functions

ReturnsFunctionThrows
STIO GetHandler(STFileHandler.MODE TheMode,String ThePath,Class TheClass) Exception
Load(String Path,STBase TheObject) Exception
Load(String Path,STBase TheObject,
     boolean ShowSettingsDialogs)
Exception
Save(String Path,STBase TheObject) Exception
Save(String Path,STBase TheObject,boolean ShowDialogs) Exception

Painter Package

STPainterRasterCategory

Enumerated Types

TYPE
    ALL_CATEGORIES - All Values


PointTransform Package

STPointGridFilter

Static Functions

ReturnsFunctionThrows
STLayerPoint Filter(STLayerPoint TheInputLayer,
     double CellWidth,double CellHeight)
Exception

Pyramid Package

STToPyramid

Static Functions

ReturnsFunctionThrows
ToPyramid(STContentBounded TheInput,boolean NewRemoveTinyAreas,int MaxSteps,
     STLayerPyramid
TheOutput)
Exception

Raster Package

STRaster

Enumerated Types

PIXEL_TYPE
    GRAY - Gray
    RGB - RGB
    ARGB - ARGB
    PALETTE - Palette
    N_BAND - N-Band

DATA_TYPE
    UINT8 - Unsigned Byte (8-bit integer)
    UINT16 - Unsigned Short (16-bit integer)
    INT16 - Signed Short (16-bit integer)
    INT32 - Signed Int (32-bit integer)
    FLOAT32 - Float (32-bit floating-point)
    FLOAT64 - Double (64-bit floating-point)

Object Functions

ReturnsFunctionThrows
Copy(STRaster TheInput) Exception
CopyData(STRaster TheInput) Exception
CopyPropertiesButNotData(STRaster TheInput) Exception
DATA_TYPE GetDataType()  
STRaster GetDrawingRaster(boolean StretchFlag,double StretchMin,double StretchMax,
     STColorRamp
TheColorRamp,int Transparency)
Exception
STRaster GetDrawingRasterWithPalette(boolean StretchFlag,double StretchMin,double StretchMax,
     STPalette
NewPalette,int Transparency)
Exception
int GetHeightInPixels()  
STRaster GetMaskAsRaster() Exception
double[][] GetMinMaxes() Exception
int GetNumBands()  
STPalette GetPalette()  
double[] GetPixelByPixelCoordinates(int PixelX,int PixelY) Exception
double[] GetPixelByRef(double RefX,double RefY) Exception
double GetPixelHeightFromRefHeight(double RefHeight)  
double GetPixelWidthFromRefWidth(double RefWidth)  
double GetPixelXFromRefX(double RefX) Exception
double GetPixelYFromRefY(double RefY) Exception
double GetRefHeightFromPixelHeight(double PixelHeight)  
double GetRefWidthFromPixelWidth(double PixelWidth)  
double GetRefXFromPixelX(double PixelX) Exception
double GetRefYFromPixelY(double PixelY) Exception
double GetSample(int PixelX,int PixelY,int Band,double Default) Exception
double GetSampleByRef(double RefX,double RefY,int Band,double Default) Exception
long GetSizeInBytes() Exception
STRaster GetStretchedTo255() Exception
int GetWidthInPixels()  
  STRaster()  
SetDataType(DATA_TYPE NewDataType) Exception
SetHeightInPixels(int NewHeight) Exception
SetNumBands(int New) Exception
SetPalette(STPalette New) Exception // typically used to replace a mask that has been sized
SetPixel(int PixelX,int PixelY,double[] Pixel) Exception
SetPixelByRefCoordinates(double RefX,double RefY,double[] Pixel) Exception
SetSample(int PixelX,int PixelY,int Band,double Value) Exception
SetSampleByRef(double RefX,double RefY,int Band,double Value) Exception
SetWidthInPixels(int NewWidth) Exception

RasterExtension Package

STContour

Static Functions

ReturnsFunctionThrows
Contour(STRaster TheInput,double StartingLevel,
     int MaxLevels,double Interval,STLayerVectors TheOutput)
Exception

STCostDistance

Static Functions

ReturnsFunctionThrows
STRaster Find(STRaster TheOrigin,STRaster TheCostRaster,
     double NewOriginValue,double NewTolerance)
Exception

STPixelStats

Static Functions

ReturnsFunctionThrows
STRaster Max(STRaster[] TheInputs) Exception
STRaster Mean(STRaster[] TheInputs) Exception
STRaster Min(STRaster[] TheInputs) Exception
STRaster StdDev(STRaster[] TheInputs) Exception

STRandomizer

Static Functions

ReturnsFunctionThrows
AddRandomPoints(STRaster TheInput,int NumPixels,
     double Value)
Exception

STTopography

Static Functions

ReturnsFunctionThrows
STRaster Aspect(STRaster TheInput,double ZFactor) Exception
STRaster AspectEastWest(STRaster TheInput,double ZFactor) Exception
STRaster Hillshade(STRaster TheInputRaster,double Elevation,
     double Direction,double ZFactor,STColorRamp TheColorRamp)
Exception
STRaster Slope(STRaster TheInput,double ZFactor) Exception

RasterTransform Package

STBandCopier

Static Functions

ReturnsFunctionThrows
STRaster ConvertToRGB(STRaster TheRaster) Exception
STRaster ExtractBands(STRaster TheInput,int[] SourceBands) Exception

STCalculator

Static Functions

ReturnsFunctionThrows
STRaster Absolute(STRaster TheInput1) Exception
STRaster Add(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Add(STRaster TheInput1,double Value) Exception
STRaster And(STRaster TheInput1,STRaster TheInput2) Exception
STRaster And(STRaster TheInput1,double Value) Exception
STRaster ArcCos(STRaster TheInput1) Exception
STRaster ArcSin(STRaster TheInput1) Exception
STRaster ArcTan(STRaster TheInput1) Exception
STRaster Ceiling(STRaster TheInput1) Exception
STRaster Cos(STRaster TheInput1) Exception
STRaster Divide(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Divide(STRaster TheInput1,double Value) Exception
STRaster Divide(double Value,STRaster TheInput1) Exception
STRaster E(STRaster TheInput1) Exception
STRaster Equal(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Equal(STRaster TheInput1,double Value) Exception
STRaster Equal(double Value,STRaster TheInput1) Exception
STRaster Exp(STRaster TheInput1) Exception
STRaster Floor(STRaster TheInput1) Exception
STRaster GreaterThan(STRaster TheInput1,STRaster TheInput2) Exception
STRaster GreaterThan(STRaster TheInput1,double Value) Exception
STRaster GreaterThan(double Value,STRaster TheInput1) Exception
STRaster GreaterThanOrEqual(STRaster TheInput1,STRaster TheInput2) Exception
STRaster GreaterThanOrEqual(STRaster TheInput1,double Value) Exception
STRaster GreaterThanOrEqual(double Value,STRaster TheInput1) Exception
STRaster LessThan(STRaster TheInput1,STRaster TheInput2) Exception
STRaster LessThan(STRaster TheInput1,double Value) Exception
STRaster LessThan(double Value,STRaster TheInput1) Exception
STRaster LessThanOrEqual(STRaster TheInput1,STRaster TheInput2) Exception
STRaster LessThanOrEqual(STRaster TheInput1,double Value) Exception
STRaster LessThanOrEqual(double Value,STRaster TheInput1) Exception
STRaster Log(STRaster TheInput1) Exception
STRaster Max(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Max(STRaster TheInput1,double Value) Exception
STRaster Max(double Value,STRaster TheInput1) Exception
STRaster Min(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Min(STRaster TheInput1,double Value) Exception
STRaster Min(double Value,STRaster TheInput1) Exception
STRaster Multiply(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Multiply(STRaster TheInput1,double Value) Exception
STRaster Multiply(double Value,STRaster TheInput1) Exception
STRaster NotEqual(STRaster TheInput1,STRaster TheInput2) Exception
STRaster NotEqual(STRaster TheInput1,double Value) Exception
STRaster NotEqual(double Value,STRaster TheInput1) Exception
STRaster Or(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Or(STRaster TheInput1,double Value) Exception
STRaster PI(STRaster TheInput1) Exception
STRaster Power(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Power(STRaster TheInput1,double Value) Exception
STRaster Power(double Value,STRaster TheInput1) Exception
STRaster Round(STRaster TheInput1) Exception
STRaster SetToValue(STRaster TheInput1,double Value) Exception
STRaster Sin(STRaster TheInput1) Exception
STRaster Subtract(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Subtract(STRaster TheInput1,double Value) Exception
STRaster Subtract(double Value,STRaster TheInput1) Exception
STRaster Tan(STRaster TheInput1) Exception
STRaster Xor(STRaster TheInput1,STRaster TheInput2) Exception
STRaster Xor(STRaster TheInput1,double Value) Exception

STClassifier

Static Functions

ReturnsFunctionThrows
STRaster Classify(STRaster Input,double MinValue,
     boolean MinIsNegativeInfinity,double MaxValue,boolean MaxIsInfinity,
     double NewValue,boolean NewValueIsMask)
Exception
STRaster Classify(STRaster Input,double MinValue,
     double MaxValue,double NewValue)
Exception

STColorRamp

Static Functions

ReturnsFunctionThrows
STRaster ColorRamp(STRaster TheInput,STColorRamp TheColorRamp) Exception

STCrop

Static Functions

ReturnsFunctionThrows
STRaster CropByPixels(STRaster TheInput,int X,int Y,
     int WidthInPixels,int HeightInPixels)
Exception
STRaster CropByRef(STRaster TheInput,double RefX,double RefY,
     double RefWidth,double RefHeight)
Exception

STDataType

Static Functions

ReturnsFunctionThrows
STRaster Convert(STRaster TheInput,DATA_TYPE DataType,boolean Stretch) Exception
STRaster ConvertToByte(STRaster TheInput,boolean Stretch) Exception
STRaster ConvertToDouble(STRaster TheInput) Exception
STRaster ConvertToFloat(STRaster TheInput) Exception
STRaster ConvertToInt(STRaster TheInput) Exception
STRaster ConvertToShort(STRaster TheInput,boolean Stretch) Exception

STFiller

Enumerated Types

FILL_TYPE
    FILL_NONE - None
    FILL_SINGLE_VALUE - Single Value
    FILL_SINE - Sine Wave
    FILL_GRID - Grid
    FILL_COLOR_PANE_TEST - Color Pane Test (RGB only)
    FILL_TOP_TO_BOTTOM - Top to Bottom
    FILL_BOTTOM_TO_TOP - Bottom to Top
    FILL_LEFT_TO_RIGHT - Left to Right
    FILL_RIGHT_TO_LEFT - Right to Left

Static Functions

ReturnsFunctionThrows
Fill(STRaster TheRaster,FILL_TYPE FillType,double MinFillValue,
     double MaxFillValue)
Exception
Fill(STRaster TheRaster,double Value) Exception
Fill(STRaster TheRaster,double[] Values) Exception

STMatrix

Enumerated Types

MATRIX_TYPE
    CUSTOM - Create your own matrix
    SMOOTH_A_LOT - Blurs the raster
    SMOOTH_A_LITTLE - Just smooths out sharp changes
    SHAPREN_A_LITTLE - Sharpens gradual changes a bit
    SHARPEN_A_LOT - Acentuates gradual changes a lot
    EDGE_DETECT - Extreme sharpening to find edges

Static Functions

ReturnsFunctionThrows
STRaster Apply(STRaster TheInput,int MatrixWidth,MATRIX_TYPE Type) Exception

STOrientation

Static Functions

ReturnsFunctionThrows
STRaster CCW(STRaster TheInput) Exception
STRaster CW(STRaster TheInput) Exception
Flip(STRaster TheInput) Exception
Mirror(STRaster TheInput) Exception

STPadder

Static Functions

ReturnsFunctionThrows
STRaster Pad(STRaster TheInput,int Left,int Top,int Right,int Bottom,
     double FillValue,double MaskValue)
Exception

STPalettizer

Static Functions

ReturnsFunctionThrows
STRaster ConvertToPalette(STRaster TheInput) Exception

STPaster

Static Functions

ReturnsFunctionThrows
STRaster Paste(STRaster ThePastee,STRaster TheReceiver,
     double PercentOpaque,boolean DoPad,boolean DoMax)
Exception
STRaster Paste(STRaster ThePastee,STRaster TheReceiver,double PercentOpaque,
     boolean DoPad,boolean DoMax,int DestinLeft,int DestinTop)
Exception

STRotate

Static Functions

ReturnsFunctionThrows
STRaster Rotate(STRaster TheInput,
     double AngleInDegrees)
Exception

STSample

Static Functions

ReturnsFunctionThrows
STRaster Sample(STRaster TheInput,STBounds TheBounds,
     int WidthInPixels,int HeightInPixels,METHOD TheMethod)
Exception
STRaster Sample2(STRaster TheInput,STBounds TheBounds,
     int WidthInPixels,int HeightInPixels,METHOD TheMethod)
Exception
STRaster Scale(STRaster TheInput,double XScale,double YScale,
     STSample.METHOD
SamplingMethod)
Exception // jjg - SamplingMethod not used

SRS Package

STProjector

Object Functions

ReturnsFunctionThrows
double[] ProjectFromGeographic(double X,double Y) Exception
ProjectFromGeographic(double[] TheXArray,double[] TheYArray) Exception
double[] ProjectToGeographic(double X,double Y) Exception
ProjectToGeographic(double[] TheXArray,double[] TheYArray) Exception

STProjectorManager

Static Functions

ReturnsFunctionThrows
Project(Geometry TheGeometry,STSRS TheSource,STSRS TheDestin) Exception
Project(STContentBounded TheContent,STSRS TheSource,
     STSRS
TheDestin)
Exception
Project(double[] RefX,double[] RefY,STSRS TheSource,
     STSRS
TheDestin)
Exception
double[] ProjectCoordinate(double RefX,double RefY,STSRS TheSource,
     STSRS
TheDestin)
Exception
ProjectTo(STContentBounded TheContent,STSRS TheDestin) Exception

STSRS

Static Functions

ReturnsFunctionThrows
STSRS NewEPSG(int NewEPSGCode) Exception
STSRS NewGeographic(STGCS TheGCS) Exception
STSRS NewGoogleMercator() Exception
STSRS NewStatePlane(STGCS TheGCS,String State,String Zone,
     STLinearUnit
LinearUnit)
Exception
STSRS NewUTM(STGCS TheGCS,int UTMZone,boolean South) Exception

Scene Package

STLayer

Object Functions

ReturnsFunctionThrows
STTable GetTable()  

STLayerPoint

Object Functions

Inherited From: STLayerVectors
ReturnsFunctionThrows
  STLayerPoint() Exception

STLayerPyramid

Object Functions

Inherited From: STLayerVectors
ReturnsFunctionThrows
  STLayerPyramid() Exception

STLayerRaster

Object Functions

Inherited From: STLayer
ReturnsFunctionThrows
STRaster GetRaster() Exception
  STLayerRaster() Exception
SetRaster(STRaster New) Exception

STLayerRegions

Object Functions

Inherited From: STLayerVectors
ReturnsFunctionThrows
  STLayerRegions() Exception

STScene

Object Functions

ReturnsFunctionThrows
  STScene() Exception

Symbol Package

STStyle

Object Functions

ReturnsFunctionThrows
  STStyle(Color PenColor,Color FillColor,double FontSize,boolean NewSizeInRefUnits) Exception
SetPenAntialiased(boolean NewValue)  
SetPenWidth(double NewPenWidth)  

Table Package

STColumn

Enumerated Types

COLUMN_TYPE
    UNKNOWN - Column type has not been defined. Not recommended.
    STRING - Columns contain text strings
    DOUBLE - Columns contain 64-bit floating point values (doubles)
    INTEGER - Columns contain 32-bit integer values
    DATE - Columns contain dates
    BLOB - Columns contain binary large objects

STTable

Object Functions

ReturnsFunctionThrows
DeleteColumn(int Index) Exception
DeleteRow(int Row) Exception
STColumn GetColumn(int Index)  
int GetColumnIndexByName(String Heading)  
GregorianCalendar GetDateCell(int RowIndex,int ColumnIndex) Exception
Double GetDoubleCell(int RowIndex,int ColumnIndex) Exception
String GetHeading(int ColumnIndex)  
long GetLongCell(int RowIndex,int ColumnIndex) Exception
int GetNumColumns()  
int GetNumRows()  
Object GetObjectCell(int RowIndex,int ColumnIndex) Exception
String GetStringCell(int RowIndex,int ColumnIndex) Exception
int InsertColumn(int Index,COLUMN_TYPE Type,String Heading) Exception
int InsertRow(int Row) Exception
SetCell(int RowIndex,int ColumnIndex,Double Value) Exception
SetCell(int RowIndex,int ColumnIndex,GregorianCalendar Value) Exception
SetCell(int RowIndex,int ColumnIndex,String Value) Exception
SetCell(int RowIndex,int ColumnIndex,int Value) Exception
SetColumnType(int Index,COLUMN_TYPE New) Exception
SetHeading(int ColumnIndex,String Name) Exception
SetNumRows(int NewNumRows) Exception
SetSort(int ColumnIndex,boolean NewAscending) Exception
SetSortToSelected()  

Transform Package

STToRaster

Static Functions

ReturnsFunctionThrows
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

Utility Package

STJTSUtil

Static Functions

ReturnsFunctionThrows
STRaster Paint(Geometry TheGeometry,double PixelRefWidth,
     PIXEL_TYPE
PixelType,STColorRamp TheColorRamp,
     DATA_TYPE
TheDataType,STStyle TheStyle,boolean MaintainAspect)
Exception

VectorExtensions Package

STProfiler

Static Functions

ReturnsFunctionThrows
double[] Profile(STRegion TheRegion,STRaster TheRaster,
     boolean SampleOnInterval,double Interval)
Exception

VectorTransform Package

STBuffer

Enumerated Types

END_CAPS
    ROUND - Round
    BUTT - Butt
    SQUARE - Square

Static Functions

ReturnsFunctionThrows
Buffer(STLayerVectors TheInputLayer,STLayerVectors TheOutputLayer,
     double Distance,int QuadrantSegments,END_CAPS EndCapStyle)
Exception

STFixProblems

Static Functions

ReturnsFunctionThrows
Fix(STLayerVectors TheInputLayer) Exception

STOverlayLayers

Enumerated Types

OVERLAY_OPERATION
    UNION - Union (Add)
    SUBTRACT - Subtract
    INTERSECTION - Intersection
    SYMETRIC_DIFFERENCE - Symetric Difference

Static Functions

ReturnsFunctionThrows
Geometry Operate(Geometry TheGeometry1,Geometry TheGeometry2,
     OVERLAY_OPERATION
TheOperator)
Exception
Operate(STLayerVectors Input0,int AttributeColumn0,boolean SelectedOnly0,
     STLayerVectors
Input1,int AttributeColumn1,boolean SelectedOnly1,
     OVERLAY_OPERATION
TheOperator,STLayerVectors Output)
Exception

STSimplifier

Enumerated Types

SIMPLIFY_TYPE
    SIMPLE - Simple Distance
    DOUGLAS_PEUCKER - Douglas Peucker (JTS)
    DOUGLAS_PEUCKER_TOPOLOGY - Douglas Peuker topology (JTS)
    // GRID - Snap points to a grid

Static Functions

ReturnsFunctionThrows
Simplify(STLayerRegions TheLayer,SIMPLIFY_TYPE TheType,double Tolerance,
     boolean RemoveAreasBelowTolerance,boolean DeleteEmptyFeatures)
Exception

STSplitter

Static Functions

ReturnsFunctionThrows
Split(STLayerVectors TheInputLayer,boolean SelectedOnly,
     STLayerVectors
TheOutputLayer)
Exception

STToPoint

Enumerated Types

TO_POINT_METHOD
    CENTROID - Find the center of mass
    ALL - Convert all cooordinates in the data to points
    FURTHEST_DISTANCE -

Object Functions

ReturnsFunctionThrows
ToPoint(STLayerRegions TheInputLayer,STLayerPoint TheOutputLayer,
     TO_POINT_METHOD
Method)
Exception

STVectorCrop

Static Functions

ReturnsFunctionThrows
Crop(STLayerVectors TheInputLayer,STLayerVectors TheOutputLayer,
     STBounds
TheBounds)
Exception