Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dev:viewer:actions:add_view [2023/02/13 14:55] pieter |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Add View ====== | ||
- | |||
- | Click on the ' | ||
- | The available reality data will define the available Open View options.\\ | ||
- | The different View modes are described [[dev: | ||
- | |||
- | ===== Find Best Photo ====== | ||
- | |||
- | ==== Input Parameters ==== | ||
- | |||
- | FIXME Add find photo algorithm information | ||
- | |||
- | Inputs: | ||
- | * resources | ||
- | * focusPosition : The position we want to observe. | ||
- | * viewPosition : The position we are observing the observed position from. | ||
- | * 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. | ||
- | * '' | ||
- | * '' | ||
- | * requireFocusVisible : Require the projection of the focus position on the photo to be inside the photo bounds. | ||
- | * isStreetlevel : If this parameter is true, the ' | ||
- | * searchCenter : The center position to use when retrieving photo positions. | ||
- | * '' | ||
- | * '' | ||
- | * '' | ||
- | |||
- | ==== Basic Search Algorithm ==== | ||
- | |||
- | FindClosestPhoto | ||
- | |||
- | <code javascript> | ||
- | function(resource, | ||
- | { | ||
- | for(searchDistance in searchDistances2D) | ||
- | { | ||
- | let searchCenterPosition = (searchCenter = VIEW) ? viewPosition : focusPosition; | ||
- | let photoList = resource.findPhotosInCircle(searchCenterPosition, | ||
- | if (requireFocusVisible) | ||
- | { | ||
- | if (parameters.isStreetlevel) | ||
- | { | ||
- | photoList = keepPhotosWithProjectionInsidePan(photoList, | ||
- | } | ||
- | else | ||
- | { | ||
- | photoList = keepPhotosWithProjectionInsideMargin(photoList, | ||
- | } | ||
- | if (photoList.length< | ||
- | { | ||
- | photoList = keepPhotosWithProjectionInsideMargin(photoList, | ||
- | } | ||
- | } | ||
- | if (photoList.length< | ||
- | { | ||
- | continue; | ||
- | } | ||
- | photoList = sortPhotos(photoList, | ||
- | return { | ||
- | photo: photoList[0], | ||
- | relevantPhotos: | ||
- | } | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | <code javascript> | ||
- | function sortPhotos(photoList) | ||
- | { | ||
- | for(photo in photoList) | ||
- | { | ||
- | if (parameters.findCloserPhotoAlgorithm = PIXEL_DISTANCE) | ||
- | { | ||
- | photo.distance = getDistanceToProjectionCenter(photo, | ||
- | } | ||
- | if (parameters.findCloserPhotoAlgorithm | ||
- | { | ||
- | if (viewPosition!=null) | ||
- | { | ||
- | photo.distance = getDistanceToPosition(photo, | ||
- | } | ||
- | else | ||
- | { | ||
- | photo.distance = getDistanceToPosition(photo, | ||
- | } | ||
- | } | ||
- | } | ||
- | sortByDistance(photoList); | ||
- | return photoList; | ||
- | } | ||
- | </ | ||
- | | ||
- | |||
- | distanceToProjectionCenter(): | ||
- | |||
- | |||
- | |||
- | ==== Input Parameters per renderMode ==== | ||
- | |||
- | ^ ^ Streetlevel Spherical ^ Streetlevel Planar ^ UAV Planar ^ Oblique Planar ^ | ||
- | | focusPosition | ||
- | | viewPosition | ||
- | | minPhotos | ||
- | | relevantPhotosMax | ||
- | | searchDistances2D | ||
- | | findCloserPhotoAlgorithm | '' | ||
- | | requireFocusVisible | false | true | true | true | | ||
- | | isStreetlevel | ||
- | | searchCenter | ||
- | |||
- | < | ||
- | < | ||
- | |||
- | Some constants : | ||
- | * AerialDistances = '' | ||
- | * StreetlevelDistances = '' | ||
- | |||
- | |||
Last modified:: 2023/02/13 14:55