This is documentation of a bèta release.
For documentation on the current version, please check Knowledge Base.

This is an old revision of the document!


Add View

Click on the '+' icon and view mode on the left sidebar to open a new view. Next, click on the Reference View or an existing View on the location where a new View should be opened.
The available reality data will define the available Open View options.
The different View modes are described here.

Find Best Photo

Input Parameters

Inputs:

  • resourceList : The list of resources to search.
  • focusPosition : The position we want to observe.
  • viewPosition : The position we are observing the observed position from.
  • parameters

Parameters:

  • minPhotos : The minimum amount of photos to return. Ignored if not positive.
  • relevantPhotosMax : The maximum number of photos to return.
  • searchDistances2D : The array of search distance steps to use.
  • findCloserPhotoAlgorithm : The algorithm used to sort photo positions.
    • PIXEL_DISTANCE : Identifies the technique of using the pixel distance from the focus position projected on the photo, to the photo center.
    • SPATIAL_DISTANCE : Identifies the technique using spatial distance between photo position and view position (fallback on focus position).
    • ANGULAR_DISTANCE : Identifies the technique using the angular distance between the (viewPosition,focusPosition) and the (photoFocusion,focusPosition) vectors.
  • requireFocusVisible : Require the projection of the focus position on the photo to be inside the photo bounds. Applies to planars only.
  • isStreetlevel : If this parameter is true, the 'requireFocusVisible' parameter changes to an algorithm more suited to streetlevel planars. The photo pan angle is compared to the (photo,focusPosition) angle and needs to be inside 85% of the horizontal FOV of the photo.
  • searchCenter : The center position to use when retrieving photo positions.
    • FOCUS : Retrieve photo positions around the focusPosition. When findCloserPhotoAlgorithm is SPATIAL_DISTANCE, the spatial distance to the focus position will be used.
    • FOCUS_AND_VIEW : Retrieve photo positions around the focusPosition. When findCloserPhotoAlgorithm is SPATIAL_DISTANCE, photos are sorted by spatial distance to the viewPosition (fallback on focusPosition).
    • VIEW : Retrieve photo positions around the view position (fallback on focusPosition). When findCloserPhotoAlgorithm is SPATIAL_DISTANCE, photos are sorted by spatial distance to viewPosition (fallback on focusPosition).

Basic Search Algorithm

FindClosestPhoto

function findClosestPhotoAtDistance(resourceList,viewPosition,focusPosition,parameters)
{
  for(searchDistance in parameters.searchDistances2D) 
  {
    let searchCenterPosition = (searchCenter = VIEW) ? viewPosition : focusPosition;
    let photoList = resource.findPhotosInCircle(searchCenterPosition,searchDistance);
    if (requireFocusVisible)
    {
      if (parameters.isStreetlevel)
      {
        photoList = keepPhotosWithProjectionInsidePan(photoList,85%);
      }
      else
      {
        photoList = keepPhotosWithProjectionInsideMargin(photoList,20%); // projection is inside photo bounds, reduced by a 20% margin?
      }
      if (photoList.length<10)
      {
        photoList = keepPhotosWithProjectionInsideMargin(photoList,5%); // projection is inside photo bounds, reduced by a 5% margin?
      }
    }
    if (photoList.length<minPhotos)
    {
      continue;
    }
    photoList = sortPhotos(photoList, parameters)
    return {
      photo: photoList[0],
      relevantPhotos: photoList.slice(1,relevantPhotosMax)
    }
  }
}
function sortPhotos(photoList)
{
  for(photo in photoList)
  {
    if (parameters.findCloserPhotoAlgorithm = PIXEL_DISTANCE)
    {
      photo.distance = getDistanceToProjectionCenter(photo,focusPosition)
    }
    if (parameters.findCloserPhotoAlgorithm  = SPATIAL_DISTANCE)
    {
      if (viewPosition!=null)
      {
        photo.distance =  getDistanceToPosition(photo,viewPosition)
      }
      else
      {
        photo.distance = getDistanceToPosition(photo,focusPosition)
      }
    }
  }
  sortByDistance(photoList);
  return photoList;
}

distanceToProjectionCenter(): projects the focus position on the photo and returns the pixel distance from that position to the photo center.

Parameters Per RenderMode

Streetlevel Spherical Streetlevel Planar UAV Planar Oblique Planar
focusPosition <required> <required> <required> <required>
viewPosition <optional> <optional> <optional> <optional>
minPhotos 0 0 3 0
relevantPhotosMax 10 10 10 10
searchDistances2D StreetlevelDistances StreetlevelDistances AerialDistances AerialDistances
findCloserPhotoAlgorithm SPATIAL_DISTANCE SPATIAL_DISTANCE1 SPATIAL_DISTANCE1 PIXEL_DISTANCE1
requireFocusVisible false true true true
isStreetlevel true true false false
searchCenter FOCUS_AND_VIEW2 FOCUS_AND_VIEW2 FOCUS_AND_VIEW2 FOCUS

1 This is the default. User-configurable via Views → (Type) Image View → Open best planar photo by
2 This is the default. User-configurable via Views → Image Views → Open image from 3D View

Some constants :

  • AerialDistances = 25,50,100,200,400,800,1600,3200,6400,12800
  • StreetlevelDistances = 3,9,27,81,243,729
 
Last modified:: 2023/02/13 15:00