Ortho Projections (Functions and Variables Available in the Reports)

Orthographic Projections

IterateOrthoProjections - this function iterates selected ortho projections, or if none is selected, then it iterates all ortho projections.

Syntax:

  $IterateOrthoProjections( noParametersJustAnyText )

Available variables:

orthoIndex - an index of an ortho projection

orthoGuid - a GUID of the ortho projection

orthoName - a name of the ortho projection

Example:

  $IterateOrthoProjections(
    orthoIndex: $(orthoIndex), orthoGuid: $(orthoGuid), orthoName: $(orthoName)
  )    
                

ExportOrthoProjection - this function can be used to output information on an ortho projection.

Syntax:

  $ExportOrthoProjection( orthoGuid, anyText )

Parameters:

orthoGuid - a GUID of an ortho projection: use the IterateOrthoProjections function to get GUIDs of the selected ortho projections (see the example below)

Available variables:

orthoGUID - a GUID of an ortho projection

componentGUID - a GUID of the component in which the ortho projection has been created

orthoName - a name of the ortho projection

orthoWidth - the width in pixels

orthoHeight - the height in pixels

orthoUppx - the units per column pixel

orthoUppy - the units per row pixel

orthoDepthInOrthoCoordUnits - the bounding box depth (length in the x direction)

orthoWidthInOrthoCoordUnits - the bounding box width (length in the y direction)

orthoHeightInOrthoCoordUnits - the bounding box height (length in the z direction)

orthoType - the type of the ortho projection

orthoCoordSystem - the coordinate system

orthoCoordProjection - the projection

orthoCoordPrimeMeridian - the prime meridian

orthoCoordUnits - the units

orthoCoordUnitsShort - the units' short name

orthoCentreLat - a latitude of the bounding box centre (this variable and the following 10 variables are valid only if the ortho-projection type is "Map (GPS)" – the orthoType variable has value "Map (GPS)" and they are exported in epsg:4326 - GPS (WGS 84) coordinate system)

orthoCentreLon - a longitude of the bounding box centre

orthoCentreAlt - an altitude of the bounding box centre

orthoCornerNWLat - a latitude of the North-West ortho-projection corner

orthoCornerNWLon - a longitude of the North-West ortho-projection corner

orthoCornerNELat - a latitude of the North-East ortho-projection corner

orthoCornerNELon - a longitude of the North-East ortho-projection corner

orthoCornerSELat - a latitude of the South-East ortho-projection corner

orthoCornerSELon - a longitude of the South-East ortho-projection corner

orthoCornerSWLat - a latitude of the South-West ortho-projection corner

orthoCornerSWLon - a longitude of the South-West ortho-projection corner

Example:

  $IterateOrthoProjections(
    $ExportOrthoProjection( "$(orthoGuid)",
      GUID: $(orthoGUID)
      Component GUID: $(componentGUID)
      Ortho projection name: $(orthoName)
      Width [pixels]: $(orthoWidth)
      Height [pixels]: $(orthoHeight)
      Units per column pixel: $(orthoUppx)
      Units per row pixel: $(orthoUppy)
      Bounding box depth: $(orthoDepthInOrthoCoordUnits)
      Bounding box width: $(orthoWidthInOrthoCoordUnits)
      Bounding box height: $(orthoHeightInOrthoCoordUnits)
      Ortho projection type: $(orthoType)
      Coordinate system: $(orthoCoordSystem)
      Projection: $(orthoCoordProjection)
      Prime meridian: $(orthoCoordPrimeMeridian)
      Units: $(orthoCoordUnits)
      Units short name: $(orthoCoordUnitsShort)
      Bounding box centre: lat: $(orthoCentreLat), lon: $(orthoCentreLon), alt: $(orthoCentreAlt)
      NW corner: lat: $(orthoCornerNWLat), lon: $(orthoCornerNWLon)
      NE corner: lat: $(orthoCornerNELat), lon: $(orthoCornerNELon)
      SE corner: lat: $(orthoCornerSELat), lon: $(orthoCornerSELon)
      SW corner: lat: $(orthoCornerSWLat), lon: $(orthoCornerSWLon)
    )
  )
                

SaveOrtho - this function saves an ortho image into a selected folder.

Syntax:

  $SaveOrtho( orthoGuid, inputLayer, filePath, width, height )

Parameters:

orthoGuid - a GUID of an ortho projection: use the IterateOrthoProjections function to get GUIDs of the selected orthographic projections (see the example below)

inputLayer - options: "color", "altitude", or "depth" for DSM layer and "color@1", "altitude@1", or "depth@1" for DTM layer (if exists)

filePath - a path relative to attachment folder or path in format global://globalPathToFile

width - the width in pixels

height - the height in pixels

Example:

  $IterateOrthoProjections(
    $SaveOrtho( "$(orthoGuid)", "color", "ortho_$(orthoIndex)_color.jpg", 800, 800 )
  )    
                

SaveOrthoWithRegions - this function saves an ortho image with regions into a selected folder.

Syntax:

  $SaveOrthoWithRegions( orthoGuid, inputLayer, filepath, width, height )

Parameters:

orthoGuid - a GUID of an ortho projection: use the IterateOrthoProjections function to get GUIDs of the selected orthographic projections (see the example below)

inputLayer - options: "color", "altitude", or "depth" for DSM layer and "color@1", "altitude@1", or "depth@1" for DTM layer (if exists)

filePath - a path relative to attachment folder or path in format global://globalPathToFile

width - the width in pixels

height - the height in pixels

Example:

  $IterateOrthoProjections(
    $SaveOrthoWithRegions( "$(orthoGuid)", "color", "ortho_$(orthoIndex)_color.jpg", 800, 800 )
  )    
                

BeginOrthoProjections - this function has a function Project that can be used to project 3D points into orthographic images.

Syntax:

  $BeginOrthoProjections( orthoGuid, width, height, anyText )

Parameters:

orthoGuid - a GUID of an ortho projection: use the IterateOrthoProjections function to get GUIDs of the selected ortho projections (see the example below)

width - the width in pixels

height - the height in pixels

Available function:

Project

Syntax:

  $Project( x, y, z, anyText )

Parameters:

x - the x coordinate of a 3D point

y - the y coordinate of the 3D point

z - the z coordinate of the 3D point

Available variables:

oxpx - the x coordinate of the projected point

oypx - the y coordinate of the projected point

Example:

  $IterateOrthoProjections(
    $BeginOrthoProjections( "$(orthoGuid)", 100, 100,
      $ExportControlPoints(
        $Project( euclidx, euclidy, euclidz,
          oxpx: $(oxpx)
          oypx: $(oypx)
        )
      )
    )
  )    
                

OrthoProjectionVolume - this function can be used to output volumes and surfaces of an ortho projection.

Syntax:

  $OrthoProjectionVolume( orthoGuid, anyText )

Parameter:

orthoGuid - a GUID of an ortho projection: use the IterateOrthoProjections function to get GUIDs of the selected ortho projections (see the example below)

Available variables:

orthoCutVolume - a volume between the visible surface and the bottom side of the reconstruction region

orthoFillVolume - a volume between the visible surface and the top side of the reconstruction region

orthoArea2d - an area of the projection of the visible surface onto the bottom side of the reconstruction region

orthoArea3d - an area of the visible surface

Example:

  $IterateOrthoProjections(
    $OrthoProjectionVolume( "$(orthoGuid)",
      Cut Volume: $(orthoCutVolume)
      Fill Volume: $(orthoFillVolume)
      Area 2D: $(orthoArea2d)
      Area 3D: $(orthoArea3d)      
    )
  )
                

IterateOrthoMapTiles - this function is available only for georeferenced components.

Syntax:

  $IterateOrthoMapTiles( orthoGuid, inputLayer, anyText )

Parameters:

orthoGuid - a GUID of an ortho projection: use the IterateOrthoProjections function to get GUIDs of the selected ortho projections (see the example below)

inputLayer - options: "color", "altitude", or "depth" for DSM layer and "color@1", "altitude@1", or "depth@1" for DTM layer (if exists)

Available functions:

SaveOrthoMapTile - can be used to save tiles of orthographic images. The exported tiles can be used to display the orthographic images, e.g. in Google Maps. A tile has 256 x 256 pixels.

Syntax:

  $SaveOrthoMapTile( "filePath" )

Parameter:

filePath - a path relative to attachment folder or path in format global://globalPathToFile. Supported formats are: png, bmp, dib and tiff.

SaveOrthoMapTileMask - can be used to save tiles of orthographic images with masks. The exported tiles can be used to display the orthographic images, e.g. in Google Maps. A tile has 256 x 256 pixels.

Syntax:

  $SaveOrthoMapTileMask( "filePath" )

Parameter:

filePath - a path relative to attachment folder or path in format global://globalPathToFile. Supported formats are: png, bmp, dib and tiff

Available variables:

tileX - first part of a tile index: it increases from west to east

tileY - second part of a tile index: it increases from north to south

tileZ - third part of a tile index: zoom level

Example:

  $IterateOrthoProjections(
    $IterateOrthoMapTiles( "$(orthoGuid)", "color",
      $SaveOrthoMapTile("$(orthoIndex)-color_$(tileZ)_$(tileX)_$(tileY).png")
    )
  )
 

IterateOrthoMapPalette - this function iterates colors and values of a palette of altitude or depth layer of an ortho projection.

Syntax:

  $IterateOrthoMapPalette( orthoGuid, inputLayer, anyText )

Parameters:

orthoGuid - a GUID of an ortho projection: use the IterateOrthoProjections function to get GUIDs of the selected ortho projections (see the example below)

inputLayer - options: "altitude" or "depth"

Available variables:

orthoMapPalIndex - indexes range from 0 to 255

orthoMapPalRed - the red component of the RGB color, it ranges from 0 to 255

orthoMapPalGreen - the green component of the RGB color, it ranges from 0 to 255

orthoMapPalBlue - the blue component of the RGB color, it ranges from 0 to 255

orthoMapPalValue - altitude or depth value

Example:

  $IterateOrthoProjections(
    $ExportOrthoProjection( "$(orthoGuid)",
      $IterateOrthoMapPalette( "$(orthoGuid)", "altitude",
        Index: $(orthoMapPalIndex)
        Red: $(orthoMapPalRed)
        Green: $(orthoMapPalGreen)
        Blue: $(orthoMapPalBlue)
        Altitude: $(orthoMapPalValue:.2f) $(orthoCoordUnitsShort)
      )
    )
  )
                

OrthoProjectionTiming - return time it took to calculate individual parts of an ortho projection.

Syntax:

  $OrthoProjectionTiming( orthoGuid, anyText )

Parameters:

orthoGuid - a GUID of an ortho projection

Available variables:

orthoRasterizeTime - time it took to rasterize an ortho projection in seconds

orthoDtmTime - time it took to create a DTM in seconds

orthoMosaicTime - time it took to create an image mosaic in seconds

orthoTotalTime - total time it took to create an ortho projection in seconds

Example:

  $IterateOrthoProjections(
    $OrthoProjectionTiming( "$(orthoGuid)",
      Ortho Mosaic Time: $(orthoMosaicTime)
    )
  )
 

IterateOrthoMeasurements - this function iterates through ortho measurements.

Syntax:

  $IterateOrthoMeasurements( orthoGuid, anyText )
 

Parameters:

orthoGuid - a GUID of an ortho projection

Available variables:

regionIndex - index of a region

regionColor_A - alpha channel value

regionColor_R - red value (RGB)

regionColor_G - green value (RGB)

regionColor_B - blue value (RGB)

dimensionality - dimensionality of a region (1D/2D)

regionGuid - the GUID of a region

regionName - name of a region

hasOrthoVolume - has the volume information (true/false)

hasOrthoArea - has the area information (true/false)

hasOrthoBoundary - does not contain holes (true/false)

cutVolume - cut volume

fillVolume - fill volume

area2d - area of a region (2D)

area3d - Area of a region (3D)

isClosed - does not contain holes (true/false)

isAllHoles - is off the ortho projection(true/false)

orthoPerimeter - perimeter of a region

boundaryMinBoxHeight - minimal reconstruction region height

boundaryMaxBoxHeight - maximal reconstruction region height

boundaryMinOrthoCSHeight - minimal height in the coordinate system of an ortho projection

boundaryMaxOrthoCSHeight - maximal height in the coordinate system of an ortho projection

numPolygonVertices - number of vertices in a polygon

numBoundarySamples - number of boundary samples

boundaryMinAltitude - minimal altitude of the region if ortho projection is georeferenced

boundaryMaxAltitude - maximal altitude of the region if ortho projection is georeferenced

gpsPerimeter - perimeter of a region if ortho projection is georeferenced

Example:

  $IterateOrthoProjections(
    $IterateOrthoMeasurements( "$(orthoGuid)",
      Region index: $(regionIndex )
      Alpha channel value: $(regionColor_A)
      Red value (RGB): $(regionColor_R)
      Green value (RGB): $(regionColor_G)
      Blue valuere: $(regionColor_B )
      Dimensionality: $(dimensionality)
      RegionGuid: $(regionGuid)
      Region name: $(regionName)
      Has volume: $(hasOrthoVolume)
      Has area: $(hasOrthoArea)
      Has boundary: $(hasOrthoBoundary)
      Cut volume: $(cutVolume)
      Fill volume: $(fillVolume)
      Area of the region (2D): $(area2d)
      Area of the region (3D): $(area3d)
      Is closed: $(isClosed)
      Off ortho: $(isAllHoles)
      Perimeter: $(orthoPerimeter)
      Minimal box height: $(boundaryMinBoxHeight)
      Maximal box height: $(boundaryMaxBoxHeight)
      Minimal box height in ortho CS: $(boundaryMinOrthoCSHeight)
      Maximal box height in ortho CS: $(boundaryMaxOrthoCSHeight)
      Polygon vertices: $(numPolygonVertices)
      Boundary samples: $(numBoundarySamples)
      Minimal altitude (georeferenced): $(boundaryMinAltitude )
      Maximal altitude (georeferenced): $(boundaryMaxAltitude )
      Perimeter (georeferenced): $(gpsPerimeter )
      )
    )
  )
                

IterateOrthoBoundarySamples - this function iterates through boundary points of a region (2D).

Syntax:

  $IterateOrthoBoundarySamples( regionGuid, start, step, end, anyText )
 

Parameters:

regionGuid - a GUID of a region

start - index of the first point

step - step in number of points on a boundary

end - index of the last point is the biggest number smaller than end if step is positive and it is the smallest number greater than end if step is negative

Available variables:

pointIndex - index of a point

isHole - is off the ortho projection (true/false)

boxX - X coordinate of a point in the reconstruction region

boxY - Y coordinate of a point in the reconstruction region

boxZ - Z coordinate of a point in the reconstruction region

orthoX - X coordinate of a point in the ortho projection's coordinate system

orthoY - y coordinate of a point in the ortho projection's coordinate system

orthoZ - z coordinate of a point in the ortho projection's coordinate system

orthoDistanceFromStart - distance from the starting point in the ortho projection's coordinate system

euclidx - x coordinate in the Euclidean system

euclidy - y coordinate in the Euclidean system

euclidz - z coordinate in the Euclidean system

longitude - longitude (GPS)

latitude - latitude (GPS)

altitude - altitude (GPS)

gpsDistanceFromStart - distance from the starting point in the GPS system

Example:

  $IterateOrthoProjections(
    $IterateOrthoMeasurements( "$(orthoGuid)", 
      $IterateOrthoBoundarySamples( "$(regionGuid)", 1, 50, 1000,
        Point index: $(pointIndex)
        Is hole: $(isHole)
        Box X: $(boxX)
        Box Y: $(boxY)
        Box Z: $(boxZ)
        Ortho X: $(orthoX)
        Ortho Y: $(orthoY)
        Ortho Z: $(orthoZ)
        Distance from start: $(orthoDistanceFromStart)
        Euclidean x: $(euclidx)
        Euclidean y: $(euclidy)
        Euclidean z: $(euclidz)
        GPS longitude: $(longitude)
        GPS latitude: $(latitude)
        GPS altitude: $(altitude)
        GPS distance from start: $(gpsDistanceFromStart)
      )
    )
  )
 

IterateOrthoBoundaryVertices - this function iterates through boundary points of a region (3D).

Syntax:

  $IterateOrthoBoundaryVertices( regionGuid, start, step, end, anyText )
 

Parameters:

regionGuid - a GUID of a region

start - index of the first vertice

step - step in number of vertices on a boundary

end - index of the last vertice is the biggest number smaller than end if step is positive and it is the smallest number greater than end if step is negative

Available variables:

pointIndex - index of a vertice

isHole - is off the ortho projection (true/false)

boxX - X coordinate of a vertice in the reconstruction region

boxY - Y coordinate of a vertice in the reconstruction region

boxZ - Z coordinate of a vertice in the reconstruction region

orthoX - X coordinate of a vertice in the ortho projection's coordinate system

orthoY - y coordinate of a vertice in the ortho projection's coordinate system

orthoZ - z coordinate of a vertice in the ortho projection's coordinate system

orthoDistanceFromStart - distance from the starting vertice in the ortho projection's coordinate system

euclidx - x coordinate in the Euclidean system

euclidy - y coordinate in the Euclidean system

euclidz - z coordinate in the Euclidean system

longitude - longitude (GPS)

latitude - latitude (GPS)

altitude - altitude (GPS)

gpsDistanceFromStart - distance from the starting vertice in the GPS system

Example:

  $IterateOrthoProjections(
    $IterateOrthoMeasurements( "$(orthoGuid)", 
      $IterateOrthoBoundaryVertices( "$(regionGuid)", 1, 50, 1000,
        Point index: $(pointIndex)
        Is hole: $(isHole)
        Box X: $(boxX)
        Box Y: $(boxY)
        Box Z: $(boxZ)
        Ortho X: $(orthoX)
        Ortho Y: $(orthoY)
        Ortho Z: $(orthoZ)
        Distance from start: $(orthoDistanceFromStart)
        Euclidean x: $(euclidx)
        Euclidean y: $(euclidy)
        Euclidean z: $(euclidz)
        GPS longitude: $(longitude)
        GPS latitude: $(latitude)
        GPS altitude: $(altitude)
        GPS distance from start: $(gpsDistanceFromStart)
      )
    )
  )
 

Available expression functions

GetNumberOfOrthoMeasurements - return number of regions on an ortho projection.

Syntax:

  GetNumberOfOrthoMeasurements( orthoGuid )

Parameters:

orthoGuid - a GUID of an ortho projection

Contours

IterateContourSets - this function iterates contour sets of a chosen ortho projection.

Syntax:

  $IterateContourSets( orthoGuid, anyText )

Parameters:

orthoGuid - a GUID of the ortho projection

Available variables:

ContourSetIndex - an index of the contour set

Example:

  $IterateOrthoProjections( 
    $IterateContourSets ( "$(orthoGuid)", $(ContourSetIndex))
  )
                

ExportContourSet - this function can be used to output the information about the contour set.

Syntax:

  $ExportContourSet( orthoGuid, setId, epsilon, anyText )

Parameters:

orthoGuid - a GUID of the ortho projection

setId - the identificator of a contour set

epsilon - a real number used in polyline simplifying algorithm

Available variables:

contoursName - name of the contour set

contoursPixelType - specifies if contours were made on the depth or altitude layer

contoursLayer - specifies if contours were made on DSM or DTM

contoursMin - minimal depth/altitude value ( according to the pixel type)

contoursMax - maximal depth/altitude value ( according to the pixel type)

contoursInterval - depth/altitude difference between two consecutive contours

contoursCount - number of contours in the set

Available functions:

GetRenderParameters - this function gives proposed parameters for rendering contours.

Syntax:

  $GetRenderParameters( pixelSize, anyText )

Parameters:

pixelSize - requested length of a side divided by original length of the side

Available variables:

contoursRenderStep - step (in indexes) between rendered contours. It is 1 or a multiple of the number 5.

contoursRenderFirstIndex - index of the first contour to be rendered

contoursRenderMajorIndex - index of the first highlighted contour. Calculated assuming that every fifth rendered contour is highlighted.

ToWorldPoint - determines world coordinates of given point.

Syntax:

  $ToWorldPoint( imageX, imageY, Z, anyText )

Parameters:

imageX - the X image coordinate

imageY - the Y image coordinate

Z - altitude/depth is already in the world coordinate system, for example in meters above the sea level. It should have the same value as variable worldZ variable.

Available variables:

worldX - the world X coordinate

worldY - the world Y coordinate

worldZ - the world Z coordinate

IterateContours - iterate through contours of the contour set.

Syntax:

  $IterateContours( startIndex, endIndex, step, anyText )

Parameters:

startIndex - index of the contour from which the iteration will start

endIndex - index of the contour with which the iteration will end

step - iteration step

Available variables:

contourAltitude - the altitude/depth value of the contour

contourPolylineCount - number of polylines that make up the contour

contourIndex - the index of the contour

Available functions:

IterateLabels - it finds places for labels which are interval pixels apart along the polyline.

Syntax:

  $IterateLabels( interval, anyText )

Parameters:

interval - it is given in pixels of the original picture

Available variables:

labelX - the X image coordinate of the center of a label

labelY - the Y image coordinate of the center of a label

labelAngleRad - angle of a label in radians. Value 0 is true horizontal text. Value rises in a clockwise direction.

labelAngleDeg - angle of a label in degrees. Value 0 is true horizontal text. Value rises in a clockwise direction.

IteratePolylines - iterate through polylines of a contour.

Syntax:

  $IteratePolylines( noParametersJustAnyText )

Available variables:

polylineLastPointX - the X image coordinate of the last point in the polyline

polylineLastPointY - the Y image coordinate of the last point in the polyline

polylineLastPointZ - the Z image coordinate of the last point in the polyline

polylineFirstPointX - the X image coordinate of the first point in the polyline

polylineFirstPointY - the Y image coordinate of the first point in the polyline

polylineFirstPointZ - the Z image coordinate of the first point in the polyline

polylineRealLength - length of the polyline in world measurements

polylineRealLengthImg - length of the polyline in pixels

polylineIndex - the index value of a polyline

polylineIsClosed - this variable tells if the polyline is closed or not (if the first and last points are different)

polylinePointCount - number of points in polyline

Available functions:

IteratePoints - iterate through points of which the polylines are made of.

Syntax:

  $IteratePolylines( noParametersJustAnyText )

Available variables:

pointX - the X image coordinate of a point

pointY - the Y image coordinate of a point

pointZ - the Z image coordinate of a point

pointIndex - number of points in polyline

Example:

  $IterateOrthoProjections( 
    $Declare("setID", GetSelectedContourSetId("$(orthoGuid)"))
    $ExportOrthoProjection( "$(orthoGuid)", 
      $Declare("pixelSize" , GetSimplifyingFactor(orthoUppx))
      $ExportContourSet( "$(orthoGuid)", setID, pixelSize,
        Contour Set Name: $(contoursName)
        Pixel type: $(contoursPixelType)
        Layer: $(contoursLayer)
        Minimal value: $(contoursMin)
        Maximal value: $(contoursMax)
        Interval: $(contoursInterval)
        Contour count: $(contoursCount)
        $IterateContours(1, contoursCount, 2,
          Altitude: $(contourAltitude)
          $IteratePolylines( 
            Real length: $(polylineRealLength)
            Point count in polyline: $(polylinePointCount)
          )
        )
      )
    )
  )
                

Available expression functions:

GetNumberOfContourSets - returns the number of contour sets of the chosen ortho projection.

Syntax:

  GetNumberOfContourSets( orthoGUID )

Parameters:

orthoGuid - a GUID of an ortho projection

GetSelectedContourSetId - returns the ID value of the selected contour set of the chosen ortho projection.

Syntax:

  GetSelectedContourSetId( orthoGUID )

Parameters:

orthoGuid - a GUID of an ortho projection

GetSimplifyingFactor - requested length of a side divided by original length of the side.

Syntax:

  GetSimplifyingFactor( pixelSize )

Parameters:

pixelSize - requested length of a side divided by original length of the side

Scripting Report Basics

Learn how to create custom report templates

Function Sets

Functions sets and their functions, expressions and variables

Basic Functions

Project information, exporter scope, and basic function set

Images Scope

Learn how to export information about project images

Components Scope

Component export functions and variables

Camera Scope

Learn how to get information about cameras

Scene Structure Scope

Learn how to add custom point statics to reports

Control Points and Constraints Scope

Check the list of control points and constraints functionalities

Models Scope

Learn how to generate model reports

Map Scope

See the list of map export functions