BlueSpray - Help
©
SchoonerTurtles, Inc. 2012-2015 |
||||||||||
|
||||||||||
|
PackagesBlueSpray is divided up into a set of packages with related code in each package. When you open the scripting dialog BlueSpray inserts JavaScript code to load the packages that are commonly used. This web page contains an overview of the packages and the functions you will probably need the most. Base
Input and Output
Project Data
Data Handling and Processing
Other Packages You May Want to Use
Packages You Will Probably Never Need
Package: BaseBelow are two of the main classes for other classes in BlueSpray. You will never need to create an object from one of these classes but you will probably create classes that inherit functions from them and you may wish to look at their available functions in more detail. Class: BaseBase class for all BlueSpray objects and handles loading and saving objects from STX (SchoonTurtles XML) files. Class: ContentManages the project tree within BlueSpray to allow "child" objects to be added to most objects. Package: DatabaseClass: SQLIf you are not famailiar with using a relational database we recommend you review our Introduction to Relational and Spatial Databases before continuing. ODBC Functions - these functions provide Static Function: ODBCQuery()boolean Abort=SQL.Execute(String Source,String Login,String Password,String Query, int XColumn,int YColumn,Layer TheLayer); This function queries data into an existing layer object. The Source is the name of the ODBC "data source" with the login being the login to the data source (typically the administrative or user password used to access the database), and the password matches the login. The Query is a standard SQL SELECT, UPDATE, INSERT, or DELETE command. The XColumn and YColumn specify which field in the query will contain the X and Y elements of a point. These parameters are not used for lines and polygons. SQL TheConnection=new SQL(); var TheConnection=new SQL(); TheConnection.Open(...); var Abort=TheConnection.ODBCQuery(String Source,String Login,String Password,String Query); var TheGeometry=TheConnection.FectchGeometry(); TheConnection.Close(); Note: add function to query a single geometry? - Package: FileClass: FileManagerThe file manager provides individual static functions that make it easy to load and save data to most GIS, and typical PC, file formats. Function: LoadFromFile();boolean Abort=FileManager.LoadFromFile(String FilePath,Base TheObject,boolean RunAsynchronously); The FilePath is a partial or complete file path to the location of the file. TheObject is the object you want to save and will usually be a Layer but can be of almost any class of object available in BlueSpray. BlueSpray allows processes that can take a long time, such as loading large raster images, to be run in the background. If you set the RunAsynchronously to "true" the SaveToFile() function will return right away and the file will be loaded asynchronously to the rest of your code. This is usually not desired as the data from the file will not be available until the file is completely loaded. For this reason, you'll typically want to specified RunAsynchronously as "false". Function: SaveToFile();boolean Abort=FileManager.SaveToFile(String FilePath,Base TheObject,boolean RunAsynchronously); The FilePath is a partial or complete file path to the location of the file. TheObject is the object you want to save and will usually be a Layer but can be of almost any class of object available in BlueSpray. Package: SceneClass: Scene - Class: Layer - base layer for all other layers Class: LayerPoint - var TheLayer=new LayerPoint();
Class: LayerVector - Class: LayerGeometry - Class: LayerRaster Package: DocumentClass: Document Package: TableClass: Table Table Processes: Class: Sort Class: Calculate
Package: ScriptPackage: RasterClass: RasterThe class for raster objects. These are the objects inside a LayerRaster. They can rpresent the contents of a TIFF, JPEG, GIF, or PNG file. The can be a regular photo, an aerial photo, or a satellite photo. Raster ProcessesClass: Crop- Cut a raster out of raster Raster TheOutput=Crop.Crop(Raster TheInput,int X,int Y,int Width,int Height); LayerRaster TheOutput=Crop.Crop(LayerRaster TheInput,int X,int Y,int Width,int Height);Raster TheInput=FileManager.LoadFromFile(...); Raster TheOutput=Crop.Crop( TheInput,100,100,500,500);
Class: PadAdd data to the top, bottom, and/or sides of a raster Class: TileCut a raster up into a grid of smaller tiles (perfect for creating tiles for web serving in web sites like GoogleMaps). Class: DataTypeChanges the type if samples in a raster from byte, to integers, to doubles. Class: Histogram Class: Paste Class: Calculate - Mathematical operations Package: VectorVector Vector ProcessesGeometry TheInput=Database query thing Geoemetry TheOutput=Buffer.Buffer(TheInput,1);
LayerGeometry TheInput=Database query thing LayerGeometry TheOutput=Buffer.Buffer(TheInput,1);
Package: Symbol
|