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:58] pieter [Find Best Photo] |
dev:viewer:actions:add_view [2023/02/14 14:21] jeroen removed |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Add View ====== | + | ====== Add, Move, Change View ====== |
+ | |||
+ | ===== View Modes ===== | ||
+ | |||
+ | The available View Modes depend on the loaded Resources: | ||
+ | |||
+ | * 3D View | ||
+ | * Streetlevel Spherical View | ||
+ | * Streetlevel Planar View | ||
+ | * Aerial Planar View | ||
+ | * Aerial Oblique Planar View | ||
+ | |||
+ | ===== Add View ====== | ||
Click on the ' | Click on the ' | ||
Line 5: | Line 17: | ||
The different View modes are described [[dev: | The different View modes are described [[dev: | ||
- | ===== Find Best Photo ====== | + | ===== Move View ===== |
- | ==== Input Parameters ==== | + | Move an existing View to a new location |
- | Inputs: | + | Hover over the ID of the View on top, click ' |
- | * resourceList : The list of resources to search. | + | |
- | * focusPosition : The position we want to observe. | + | |
- | * viewPosition : The position we are observing | + | |
- | * parameters | + | |
+ | To move all views at once, hold Shift in move mode and choose a new location. While holding Shift, ' | ||
- | Parameters: | + | ===== Switch View Mode ===== |
- | * 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 ==== | + | Change the View Mode of a View. |
- | FindClosestPhoto | + | Hover over the eye-icon on top of the view to open the 'View Mode Fly-out' |
- | <code javascript> | + | ===== Focus other Views ===== |
- | function findClosestPhotoAtDistance(resourceList, | + | |
- | { | + | |
- | for(searchDistance in parameters.searchDistances2D) | + | |
- | { | + | |
- | let searchCenterPosition | + | |
- | let photoList | + | |
- | if (requireFocusVisible) | + | |
- | { | + | |
- | if (parameters.isStreetlevel) | + | |
- | { | + | |
- | photoList | + | |
- | } | + | |
- | else | + | |
- | { | + | |
- | photoList | + | |
- | } | + | |
- | if (photoList.length< | + | |
- | { | + | |
- | photoList | + | |
- | } | + | |
- | } | + | |
- | if (photoList.length< | + | |
- | { | + | |
- | continue; | + | |
- | } | + | |
- | 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(): | + | ===== Search & Open best photo ===== |
+ | Add, Move and Focus Views trigger the request to Search and Open the " | ||
+ | Depending on the use case and data-type other methods or configurations can be used. \\ | ||
+ | Anyway, the action consists of 2 consecutive steps | ||
+ | - Get Candidates | ||
+ | - Sort Photos | ||
+ | ==== Get Candidates ==== | ||
- | ==== Parameters Per RenderMode ==== | + | Find relevant photos around the requested Focus Coordinate. \\ |
+ | Any photo becomes a candidate if | ||
+ | * Focus Coordinate is nearby the Photo Coordinate (Search Radius) | ||
+ | * Focus Coordinate is in the field of View of the Photo. | ||
- | ^ ^ Streetlevel Spherical ^ Streetlevel Planar ^ UAV Planar ^ Oblique Planar ^ | + | Searching for candidates is done by incrementally increasing the search radius and ends when |
- | | focusPosition | + | |
- | | viewPosition | + | |
- | | minPhotos | + | |
- | | relevantPhotosMax | + | |
- | | searchDistances2D | + | |
- | | findCloserPhotoAlgorithm | '' | + | |
- | | requireFocusVisible | false | true | true | true | | + | |
- | | isStreetlevel | + | |
- | | searchCenter | + | |
- | < | + | ==== Sort Photos ==== |
- | < | + | |
- | Some constants : | + | Sort candidates by relevance, to get the best image and order alternative images. \\ |
- | * AerialDistances = '' | + | The best image has the smallest value for the selected option |
- | * StreetlevelDistances = '' | + | |
+ | Options: | ||
+ | * By Direction offset \\ Offset between the Candidate Direction (Candidate to Focus Coordinate) and Request Direction (3D View Position to Focus Coordinate). | ||
+ | * By Pixel offset \\ Pixel offset of the Focus Coordinate projected on the Candidate Image to the Candidate Image Center. | ||
+ | * By Spatial distance \\ Spatial distance of the Focus Coordinate to the Candidate Coordinate. | ||