Roll
Last checked ·
Roll turns the image about the direction the camera looks. It is the least supported of the three view angles. This page compares who can roll a view, which way a positive roll turns, who would need it and where a small unwanted roll comes from.
What the comparison shows
Five of the ten sources below take a roll and five have no field for it. The first test target, the ArcGIS camera, is among those without. In the outdoor app inventory one link out of 132 apps has a slot for roll, and its viewer sets the value to zero.
Where roll exists, the two SDKs we could test turn the image the same way as the shared view format. A very small roll can also appear by itself when a camera moves between viewers that mean different things by up.
The picture
Who can roll
| Source | Roll | What we found | Link |
|---|---|---|---|
| OGC KML | yes | “Rotation, in degrees, of the camera around the Z axis. Values range from −180 to +180 degrees.” | KML reference |
| Google Maps JavaScript 3D | yes | “The roll of the camera around the view vector in degrees.” | 3D map |
| CesiumJS | yes | A camera view takes heading, pitch and roll. “Roll is the rotation about the positive x axis.” | Camera · HeadingPitchRoll |
| MapLibre GL JS | yes | “The roll is the angle about the camera boresight.” | Camera options |
| OGC GeoPose | yes | Its basic form gives yaw, pitch and roll in a local east, north, up frame. | GeoPose |
| ArcGIS Maps SDK for JavaScript | no field | The Camera reference lists position, heading, tilt and field of view. The page does not mention roll. | Camera |
| Mapbox GL JS | no field | The camera options take a bearing and a pitch. The separate free camera takes an “orientation of the camera represented as a unit quaternion”, which can hold a roll. | Camera properties |
| deck.gl | no field | The map view and the first-person view take a bearing and a pitch. | MapView · FirstPersonView |
| Apple MapKit | no field | The map camera has a center, a distance, a heading and a pitch. | Map camera |
| Google Maps JavaScript, 2D | no field | The map options take a heading and a tilt. | Map |
A viewer without a roll field shows a level image. It can still restore the eye, the heading and the tilt.
Which way is positive
The shared view format says that a positive roll turns the top of the image toward the right side of the screen. The scene then appears turned the other way.
| SDK and version | What we measured | Same sign as the format |
|---|---|---|
| CesiumJS 1.147.0 | The camera's up vector turned 10° toward the unrolled right vector. The SDK read the roll back as 10°. | Yes |
| MapLibre GL JS 6.19.0 | A point straight ahead of the map center moved 9.0 pixels to the left of center, so the top of the image turned to the right. The SDK read the roll back as 10°. | Yes |
Both tests ran in headless Chrome with the SDK builds from the lens comparison, at the tilted Wildspitz heading and tilt for CesiumJS and at a pitch of 50° for MapLibre. They set the camera and read it back. They did not compare screenshots.
The other sources are untested. Google Maps 3D says “around the view vector” and KML says “around the Z axis”. The Mapbox free camera uses “a left-handed coordinate space” where “direction of the rotation is clockwise around the respective axis”. That wording does not settle the direction, so an adapter has to test both signs. 3D engine FOV comparison
What shared links write
| Link | Field | What happens |
|---|---|---|
| map.geo.admin.ch, 3D | camera=lon,lat,height,pitch,heading,roll | The viewer's source sets roll to zero after rendering. |
| Japan GSI Globe | #height/lat/lon/exaggeration/heading/pitch/roll/… | The viewer kept the supplied angles in the address. |
| Google Earth address | …,160.389904h,75.780757t,0r | The address has a roll slot. Our constructed link did not reopen reliably. |
Only the first of these is in the outdoor app inventory. The other 3D and panorama links there, among them ArcGIS Scene Viewer, Mapy.com, PeakFinder, PeakVisor, BEYOND and the map links with a pitch, have no roll. Outdoor app inventory · External link survey
Who would need it
A banked view is what you see from an aircraft, a paraglider or a drone in a turn, or in a photo taken with a tilted phone. The specification gives one as an example: cam:47.08,8.57,1850,95h,80t,25r,120f is a flight view at 1,850 m, heading east, banked 25° in a right turn. The inventory lists 14 flight and paragliding products. Only one has a tested link to a chosen view.
| Finding | Entries | Roll |
|---|---|---|
| Tested view link | thermal.kk7 | The link carries a bearing and a pitch. It has no roll. |
| Web map opened, view link unverified | FlyXC, Thermal Information Map | Unknown. |
| No public view link found | Gaggle, Naviter SeeYou, Sidekik, Wingit, XContest, XCTrack, burnair Map, GlidingHotspots, Paragliding Earth, Paragliding Map, WeGlide | Unknown. |
So the inventory shows no app that shares a banked view today. It also cannot show that nobody wants one, because most of these products had no view link to inspect. Outdoor app inventory
A roll nobody chose
The viewer comparison recorded a roll of 0.0665° for the tilted Wildspitz camera. Nobody set that roll. It comes from two meanings of up.
The shared view format measures up at right angles to the WGS 84 ellipsoid. Another natural choice is the line away from the Earth's center. At Wildspitz the two differ by 0.192°. A camera that is level against one of them is slightly rolled against the other.
| Camera | Heading | Tilt | Roll |
|---|---|---|---|
| Level against the line from the Earth's center | 160.365° | 75.577° | 0° |
| The same camera read at right angles to the ellipsoid | 160.348° | 75.396° | 0.0667° |
| The camera recorded in the viewer comparison | 160.365° | 75.577° | 0.0665° |
The modeled and recorded roll magnitudes agree to about 0.0002°. The recorded tuple uses a slightly different heading and tilt from the modeled ellipsoid-up row. A roll of 0.0665° moves a corner of the view by 0.85 CSS pixels at 1280 × 720 and by 0.54 at 390 × 844. The tilted example in the specification is level and carries no roll. Calculation
The roll depends on where the camera looks. For a camera at Wildspitz that faces east it is 0.19° at the horizon, 0.22° at 60° of tilt, 0.38° at 30° and 1.11° at 10°. It grows toward straight down, where roll and heading become the same turn. It passes half a degree at about 23° of tilt.
We have not checked which viewers measure up which way. A viewer that keeps its horizon level against the Earth's center would produce such a roll on every tilted view.
Looking straight down
When the camera looks straight down, heading and roll turn the image about the same line. Google Maps 3D resolves this by rule: “when there is no tilt, any roll will be interpreted as heading”.
The shared view format keeps both values as given. When such a camera opens as a flat map, the map heading is the camera heading plus the roll. A heading of 11.6° with a roll of 30° puts 41.6° at the top of the map. Camera to map
What this means for shared view links
A shared camera can carry a roll as r, in degrees from −180 up to 180. It is optional and a missing r means a level image. Camera fields · Rotation decision
A new capture writes roll with one decimal, like heading and tilt. Rounding then moves a corner by up to 0.64 CSS pixels at 1280 × 720. The capture omits roll if its magnitude before rounding is below 0.5°, as in the 0.067° example above. That turns the picture by under half a degree. It moves a corner by up to 6.4 CSS pixels at 1280 × 720 and 4.1 at 390 × 844, and leaves the center in place. A steep view from a viewer with the other up can carry a roll of 0.5° or more in magnitude. Rewriting an unchanged share keeps any nonzero roll. Precision · Calculation
Roll is not usable everywhere. The ArcGIS camera, deck.gl, Apple MapKit, the ordinary Mapbox camera options and flat map viewers have no roll. They restore the eye, heading and tilt, show a level image and report that the roll was dropped. CesiumJS, MapLibre and Google Maps 3D can apply it.
An adapter for a viewer with roll has to confirm the sign. CesiumJS and MapLibre match the format in our tests.
