Skip to content

Ground resolution in a shared map

Last checked ·

7g means 7 horizontal ground metres on the WGS84 ellipsoid per CSS pixel along screen-up at the center. It keeps that meaning when the center is written in another CRS or moved to another latitude.

One Rigi view in three forms

map:47.047,8.474,7g
map:epsg:2056:2678675.4,1211181.8,7g
map:47.047,8.474,13.893z

Swisstopo REFRAME returns LV95 easting 2,678,675.393 m and northing 1,211,181.803 m for the geographic center shown. The rounded LV95 pair differs by about 7 mm in the grid. The ellipsoidal north-up formula gives zoom 13.893499… for 7g. Written to three decimals, 13.893z gives about 7.002 m per CSS pixel at Rigi. REFRAME response · Reference conversion

Center latitude7g13.893zA 700 m feature along screen-up at 13.893z
47.047° N7.000 m per CSS px7.002 m per CSS px100 CSS px
60° N7.000 m per CSS px5.149 m per CSS px136 CSS px

At 7g, the feature spans about 100 CSS pixels at either latitude. These figures use the local scale at the center. Reproduce the calculation

Measure in the direction the map shows

Apply the heading and sample equal CSS-pixel offsets above and below the center of the usable map area. Measure the WGS84 ellipsoidal distance between the horizontal positions and divide it by the total CSS-pixel separation. Grid metres, distances on sloping terrain and the average of screen-up and screen-right can all give different values.

For example, the rotated geographic grid in the calculation gives about 0.896 ground metres per grid metre up the screen and 0.671 across it. Some OpenLayers projections use a default point-resolution estimate that averages both axes on a sphere. An adapter needs the screen-up measurement to capture this view. OpenLayers point resolution · Rotated grid calculation

After opening the Rigi 7g link, two samples one CSS pixel above and below the usable center should be about 14 m apart when the viewer can match the scale. The adapter reads back the settled view to catch zoom snapping or clamping. SDK sampling and scale settings

Why coarse views need smaller samples

At the equator in north-up Web Mercator at -3z, the analytic scale at the center is about 1,243,961 m per CSS pixel. Sampling one pixel above and below the center estimates about 1,236,200 m per CSS pixel, 0.624% low. Shrinking the offsets to 1/16 pixel reduces that error to about 0.00246%. Use an analytic local calculation when available, or check that smaller offsets give a stable result. Coarse-zoom calculation

What the horizontal scale bar can show

At 60° N in plate carrée with equal grid spacing per degree, a degree of longitude covers about half the ground distance of a degree of latitude. The values below use the local WGS84 ellipsoidal scale and a 100 CSS-pixel ruler through the center in each direction. They are calculated expectations for a viewer that can match the requested scale. Plate carrée · Reproduce the values

ViewScreen-upScreen-right
Open map:60,10,7g700 m351 m
Rotate east-up at the same native resolution351 m700 m
Open map:60,10,7g,90h700 m1,398 m

Opening the east-up link requires a coarser native resolution to restore 700 m along screen-up. A horizontal scale bar reports the distance along its own axis.

Heading can change scale in Web Mercator

At Rigi, keep the reference zoom at 13.893z and rotate from north-up to east-up. The local WGS84 ground scale along screen-up rises from about 7.0024 to 7.0243 m per CSS pixel, about 0.313%. A viewer opening both orientations at 7g adjusts native zoom to match the same requested ground resolution. Rotation calculation

Screen size and sharing

At Rigi, 7g gives about 2.8 km of vertical coverage in a 400 CSS-pixel-tall map and 5.6 km in an 800 CSS-pixel-tall map. To keep a full route in view on either screen, fit the route's extent. Device-pixel density can change how the same CSS layout is drawn. On a supported polar map, g can still share scale beyond the latitude limit of the Web Mercator reference ladder.

Viewers at the same ground resolution can show different basemap labels and features. Styles can change those at native zoom thresholds. Imagery sharpness also depends on the source. MapLibre zoom-dependent styling

Copying an existing link keeps the original payload. Sharing the current view measures the settled view and writes g by default, even after opening a link without moving the map. The host can request z output. Capture and copy rules