BlueSpray - Help
©
SchoonerTurtles, Inc. 2012-2015 |
||||||||||
|
||||||||||
|
Extending BlueSprayIntroductionBlueSpray can be easily extended to include new transforms, file IO libraries, and other high-performance features. All you have to do is create new classes by extending the existing classes, building a JAR file, and then saving the JAR file in the BlueSpray extensions folder. BlueSpray will see the JAR when started and your extensions will appear where expected in BlueSpray. Extending BlueSpray does require knowning how to program in Java and how to use a Java development envrionment. For a compiled language, Java is relatively easy to learn and one of the most popular programming lanaguages. There are a huge number of books available to learn java including "Java in a Nutshell", "Just Java", and "Core Java". The Java Tutorials available from Oracle are also a great resource. You do not need to know everything about Java, just enough to get started programming in BlueSpray as the examples below will show. There are a number of Java Integrated Develoment Environments (IDE) available including NetBeans and Eclipse, both of which are free to use and available on the Internet. We use NetBeans primarily. If you are new to Java, download one of the development envrionments menetioned above and go through a few code examples in one of the turtorials mentioned before continuing. Below is information on developing in the NetBeans development environment. Currently, BlueSpray allows Transform and File extensions. We recommend you review the material below on how to create extensions and then refer to the appropriate extension reference below.
Hierarchy summary for extensions: - STBase – can be loaded and saved to/from STX files STTransformTransforms take one or more input objects and output one or more input objects. The variety of possible transforms is huge and limited only by your imagination. BlueSpray was built not only to make it easy to created transforms but also to allow them to run at great speed. STTransform can be extended to transform point, vector, and/or raster data. STTransformRasterLarge rasters do not always fit into memory. STTransformRaster allows your transforms to operate on large rasters by breaking the raster into Tiles. When your transform is selected, a tile will be read from a raster file or a pyramid, your transform will be run on it, and then the result will be saved to disk. This is repeated for all tiles in the raster. STFileThere are a huge number of different file formats for geospatial and other data. BlueSpray includes the most common file formats but you can add additional file handlers for other file formats.
Additional ExtensionsBlueSpray can also be extended with the following types of extensions. Contact SchoonerTurtles for more information. OverviewBlueSpray was built with extensions in mind. The hiearchy chart below shows the typical extensions developers will want to create in bold. The approach is to create a new Java class following the instructions on the following pages. Your class can access any of the other classes within BlueSpray (and their are quite a few) and you can add additional classes from OpenSource libraries or of your own creation. You'll then build your class and any required libraries into a JAR and place the JAR in the appropriate extensions folder in the same folder as BlueSpray. Then your extension will appear in BlueSpray the next time you start the application. The instructions that follow will get you started with writing extensions. These are reference information and include all of the BlueSpray classes. In theory, you can extend any part of BlueSpray and even replace the entire user interface. If you do, please contact SchoonerTurtles as this level of modification can be a copyright violation. Hierarchy summary for extensions:
- STBase – can be loaded and saved to/from STX files STItemItems are objects that appear in the view and typically can be manipulated by the user. Items include boxes, ovals, text blocks, and the documents they are contained in. Scenes that contain layers are also items but new layers should be created from the layers class so they can be georeferenced in a scene. STScaleBarBlueSpray allows the addition of different types of scalebars. STLayerLayers contain geospatial data including points, vector data, and rasters. You can extend BlueSpray for these types of data or georeferened overlays such as grids or rosettes. STSQLThe database objects allow geospatial data to be saved and aloded to and from a database such as SQL Server, PostGRES/PostGIS, and MySQL STNetworkServiceNetwork objects allow access to geospatial data available on the Internet including WMS, WFS, etc. - Not implemented STProjectorThere are a limited number of projection engines available so BlueSpray internally implements all of the major ones (GDAL, GeoTools, and some custom ones). We are not currently supporting external projector engines but let us konw if you'd like to add one and we'll modify BlueSpray to allow external ones. STPainterPainters render raster and vector data into the view. This includes borders on items. STToolsTools allow the user to create new data in layers and documents.
|