Developer Manual
This section of the online help is intended for developers.
The platform uses the Voxel Farm Cloud solution for storage, processing and rendering of spatial data. For this reason, many of the APIs to interact with the platform are provided by Voxel Farm and will be under the "VoxelFarm" namespace.
The platform offers a set of APIs for developers to extend the platform's functionality. There are two main types of APIs: server-side and client-side.
Server-side APIs allow to run custom code that performs spatial tasks in a massively parallel fashion. The code is supplied by the developer as a Program entity, which runs within the context of the platform. In other cases, the programs define how different datasets will be combined together in a visualization. For more about Server-side programs, check out the Server-side Programs section of this guide.
Also server-side, the platform features a REST API which exposes the entity model of the platform. This allows to create new objects, start processing jobs like reports among other tasks. For more about the REST API, check out the REST Interface section of this guide.
Client-side APIs allow external applications or agents to interact with the platform. This may be streaming spatial data for rendering, consuiming volumetric data for local reports, export jobs, among other tasks. Fore more about client-side APIs, please check the following sections:
REST Interface - Entity Model
Introduction
A Voxel Farm project is a collection of entities. Each entity is a collection of key-value pairs....
Shared Properties
The following properties are found in most entities: ID Contains the unique ide...
Entity-specific Properties
File VIEW Defines a View entity. Views store a pre-configured way of viewing multiple datasets. ...
Spatial Properties
Some entities are of spatial nature, in these cases, the entity will have a set of properties rel...
Extended Block Model Metadata
When submitting files for a new Block Model raw dataset (file_type RAWBM), the system expects an ...
Extended Drill Hole Metadata
When submitting files for a new Drill Hole raw dataset (file_type RAWDH), the system expects an a...
Extended Voxelized Mesh Metadata
In order to produce voxelized mesh sets, the mesh source RAWMESH entity requires additional files...
Extended Geo-chemical Metadata
When submitting files for a new Geo-chemical raw dataset (file_type RAWGEOCHEM), the system expec...
REST Interface - Working with Projects and Entities
Getting all Project Entities
This call retrieves all entities in the project. Method GET URL <server>/entity.ashx Paramet...
Getting an Entity
This call retrieves one entity. Method GET URL <server>/entity.ashx Parameters id...
Requesting a new ID
The REST API provides a mean to obtain a new unique identifier. This is useful when creating obje...
Creating a Project
This call creates a new project. Method POST URL <server>/entity.ashx Post Payload Multi-pa...
Creating an Entity
This call creates a new entity. Method POST URL <server>/entity.ashx Parameters p...
Updating an Entity
This call updates the properties of an existing entity. Method POST URL <server>/entity.ashx ...
Deleting Entities
This call deletes a list of entities from the project. If the entity has any data associated to i...
Getting Entity Files
Some entities may have raw files associated to them. This is the case of raw point clouds and unp...
Uploading Entity Files
Some entities may have raw files associated to them. This is the case of raw point clouds and unp...
Uploading large files
In occasions, file sizes can be prohibitively large for uploading using the REST interface, as so...
Retrieving Processing Log Files
This call retrieves the processing log for an entity. Method GET URL <server>/file.ashx Para...
Adding versions to Workflow Products
The process of triggering a new version for a Workflow Product involves the following general ste...
Rest Interface - Advanced REST calls
Triggering Jobs
A typical project will require to process raw files into spatially indexed datasets. This process...
Triggering Reports
Reports, like some other entities, require to be processed in order to have their data ready for ...
Triggering Export Jobs
Export entities allow to extract information from Voxel Farm Servers into a standard format. Curr...
Getting Program Inputs
This REST call can be used to request the input metadata for a custom program in the system. The ...
Validating a Program
This REST call can be used to validate a view, report or generator program. The program’s code mu...
Creating Views
Views are special entities which can be visualized in the 3D viewer. A view will typically involv...
Adding Users to Projects
The REST interface enforces a simple security model. In this model, a single user may be associat...
Python - API Setup
Initialize API
This examples shows how to create a new instance of the Voxel Farm client Python API. # Import t...
Provide Credentials
This example shows how to provide credentials for API authentication. # Set credentials vf_to...
Specify an HTTP proxy
This example shows how to specify an HTTP proxy to be used in all HTTP calls made by the API. # ...
Get CRS from project
This example shows how to retrieve the project's CRS (Coordinate Reference System). # Get the co...
Serverless Programs - Python
Voxel Generator Programs
A spatial entity will go through several stages in its lifetime. It is possible to provide custom...
Report Programs
Reports are special entities that contain tabular results, like a CSV table. These results are ob...
View Programs
A View entity defines a way to visualize several datasets together. In order to decide which data...
Python Program Reference
The following table lists the functions and properties available in the Python programmable inter...
Program Examples
Voxel Generator for a Torus object This program generates a volumetric Torus object: import v...
Serverless .Net Lambdas
Submitting .Net Lambdas
The platform allows users to run Spatial Lambdas that are compiled as standard .Net assemblies. ...
Writing Report Lambdas
Reports are processes that the platform runs over spatial datasets in a massively parallel fashio...
IVoxelFarmReportLambda
The IVoxelFarmReportLambda interface provides a way to supply custom execution code for a report ...
IVoxelFarmReportLambdaHost
The IVoxelFarmReportLambdaHost interface provides access to platform features. Methods: ...
IVoxelFarmReportDoneLambdaHost
The IVoxelFarmReportLambdaHost interface provides access to platform features during the final st...
Report Lambda Examples
using System; using System.IO; using System.IO.Compression; using VoxelFarm.SpatialLambda; ...
Embed Viewer
C# Client Library
Introduction
The Voxel Farm solution includes a thin C# client library. This client allows applications runnin...
Threading Model
The C# Client is designed to operate in high-frequency, real-time systems like VR rendering. It c...
Coordinate Systems
When working with Voxel Farm projects, it is possible to encounter up to three different coordina...
Spatial Indexing
A grid is assumed to divide the world into equally-sized 3D cells. Each cell measures VoxelFarmCo...
Creating a View
In order to access spatial information from the Voxel Farm, the application will have to create a...
View Configuration
Once the project loads, the application must determine how to configure the client view. A single...
Using Views for Rendering
The C# Client Library allows to integrate the Voxel Farm platform into existing rendering environ...
Using Views for Data Retrieval
The C# Client library allows a simpler interaction model for applications that just want to read ...
Example - Mesh Export
The following C# program connects to a Voxel Farm server and exports the terrain surface within a...
Unity3D Client
Introduction
The Voxel Farm SDK contains a packaged Unity3D plugin you may add to any existing or new Unity3D ...
Unity3D Example
The Unity3D example is located in the “<SDKRoot>\Client.Unity\Example” folder. Use that folder to...
Using the Unity3D Plugin
To add the Voxel Farm Unity3D plugin to a new project, select “Assets > Import Package > Import C...
Material Tracking API
Introduction
The platform features a component for material tracking. This is a voxel layer that can be used t...
Writing Material Changes
This section describes the API used to submit material changes to the tracking layer. In general...
Retrieving Material Changes
The REST interface allows to retrieve voxel sagas. The interface returns sagas in singularities a...
Updating a resource model
The material tracking layer entity is initialized in the same fashion as other processed entities...
Material Tracking Queries
The Material Tracking information can be retrieved from the system using the C# client library. ...
Material Operation Tables
A Material Operation Table is a CSV file, where each row contains a material tracking operation. ...
Updates and Simulations
The Material Tracking Layer builds entropy as it operates, following the direction of time. That ...