GlobalGeodeticQuad class

"Global Geodetic Quad" tile matrix set ("World CRS84 Quad" for WGS 84).

Tiles are defined in the Equirectangular Plate Carrée projection in the CRS84 coordinate reference system (longitude, latitude) for the whole world. At the zoom level 0 the world is covered by two tiles (tile matrix width is 2 and matrix height is 1). The western tile (x=0, y=0) is for the negative longitudes and the eastern tile (x=1, y=0) for the positive longitudes.

Using "Global Geodetic Quad" involves following coordinates:

  • position: geographic coordinates (longitude, latitude)
  • world: a position scaled to the pixel space of the map at level 0
  • pixel: pixel coordinates (x, y) in the pixel space of the map at zoom
  • tile: tile coordinates (x, y) in the tile matrix at zoom

Coordinate value ranges for the world covered by the tile matrix set (when tile size is 256 pixels):

  • position / longitude: (-180.0°, 180.0°)
  • position / latitude: (-90.0°, 90.0°)
  • world / x: (0.0, 512.0)
  • world / y: (0.0, 256.0)
  • pixel at level 0 / x: (0, 511)
  • pixel at level 0 / y: (0, 255)
  • pixel at level 2 / x: (0, 2047)
  • pixel at level 2 / y: (0, 1023)
  • tile at level 0 / x: (0, 1)
  • tile at level 0 / y: (0, 0)
  • tile at level 2 / x: (0, 7)
  • tile at level 2 / y: (0, 3)

Tile coordinates at level 0 (two tiles covering the whole world):


| 0,0 | 1,0 |

Tile coordinates at level 1 (tile matrix width is 4 and height is 2):


| 0,0 | 1,0 | 2,0 | 3,0 |

| 0,1 | 1,1 | 2,1 | 3,1 |

Tile coordinates at level 2 (tile matrix width is 8 and height is 4):


| 0,0 | 1,0 | 2,0 | 3,0 | 4,0 | 5,0 | 6,0 | 7,0 |

| 0,1 | 1,1 | 2,1 | 3,1 | 4,1 | 5,1 | 6,1 | 7,1 |

| 0,2 | 1,2 | 2,2 | 3,2 | 4,2 | 5,2 | 6,2 | 7,2 |

| 0,3 | 1,3 | 2,3 | 3,3 | 4,3 | 5,3 | 6,3 | 7,3 |

Each tile contains 256 x 256 pixels when the tile size is 256. As for level 2 there are 8 x 4 tiles, then the map canvas size is 2048 x 1024 pixels for that level. If the tile size is 512, then the map canvas size is 4096 x 2048 pixels.

Examples above uses "top-left" origin for world, pixel and tile coordinates. If "bottom-left" origin is used then y coordinates must be flipped, for example zoom level 1:


| 0,1 | 1,1 | 2,1 | 3,1 |

| 0,0 | 1,0 | 2,0 | 3,0 |

More information: https://docs.opengeospatial.org/is/17-083r2/17-083r2.html

Inheritance
Annotations
  • @immutable

Constructors

GlobalGeodeticQuad.worldCrs84({int maxZoom = 22, int tileSize = 256, CanvasOrigin origin = CanvasOrigin.topLeft})
"World CRS84 Quad" (WGS 84) tile matrix set with tileSize and origin.
const

Properties

converter ScaledConverter
A map converter between geospatial positions and map coordinates.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
maxZoom int
The maximum (suggested) zoom level for this tile matrix set.
final
origin CanvasOrigin
The position of the origin in a tile matrix and map pixel "canvas".
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tileSize int
The number of pixels for one tile in one axis (normally 256 or 512).
final

Methods

mapBounds() GeoBox
Returns a bounding box with min and max positions for the whole map.
inherited
mapHeight(int zoom) int
The number of pixels ("map height") at zoom in the Y axis.
override
mapWidth(int zoom) int
The number of pixels ("map width") at zoom in the X axis.
override
matrixHeight(int zoom) int
The number of tiles ("matrix height") at zoom in the Y axis.
override
matrixWidth(int zoom) int
The number of tiles ("matrix width") at zoom in the X axis.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pixelArcResolution(int zoom) double
The arc resolution (longitudal) of a pixel in degrees at zoom.
inherited
pixelGroundResolution(int zoom) double
The groud resolution (in meters) of a pixel at zoom.
override
pixelToPosition(Scalable2i pixel) Geographic
Transforms pixel coordinates to a position.
inherited
pixelToTile(Scalable2i pixel) Scalable2i
Returns a tile covering a region in pixel coordinates.
inherited
pixelToWorld(Scalable2i pixel) Projected
Transforms pixel coordinates to world coordinates.
inherited
positionToPixel(covariant Position position, {int zoom = 0}) Scalable2i
Transforms position to pixel coordinates at zoom.
inherited
positionToTile(covariant Position position, {int zoom = 0}) Scalable2i
Returns a tile at zoom covering a region in position.
inherited
positionToWorld(covariant Position position) Projected
Transforms position to world coordinates.
inherited
scaleDenominator(int zoom, {double screenPPI = screenPPIbyOGC}) double
The map scale denominator at zoom and screenPPI.
override
tileArcResolution(int zoom) double
The arc resolution (longitudal) of a tile in degrees at zoom.
inherited
tileGroundResolution(int zoom) double
The groud resolution (in meters) of a tile at zoom.
override
tileToBounds(Scalable2i tile) GeoBox
Returns a bounding box with min and max positions for tile.
inherited
tileToPixel(Scalable2i tile, {Aligned align = Aligned.center, bool requireInside = false}) Scalable2i
Transforms a fractional point defined by align inside tile to pixel coordinates.
inherited
tileToPosition(Scalable2i tile, {Aligned align = Aligned.center}) Geographic
Transforms a fractional point defined by align inside tile to a position.
inherited
tileToWorld(Scalable2i tile, {Aligned align = Aligned.center}) Projected
Transforms a fractional point defined by align inside tile to world coordinates.
inherited
toString() String
A string representation of this object.
inherited
worldToPixel(Projected world, {int zoom = 0}) Scalable2i
Transforms world coordinates to pixel coordinates at zoom.
inherited
worldToPosition(Projected world) Geographic
Transforms world coordinates to a position.
inherited
worldToTile(Projected world, {int zoom = 0}) Scalable2i
Returns a tile at zoom covering a region in world coordinates.
inherited
zoomFromPixelGroundResolution(double resolution) double
The zoom from pixel ground resolution in meters.
override
zoomFromScaleDenominator(double denominator, {double screenPPI = screenPPIbyOGC}) double
The zoom from map scale denominator at given screenPPI.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited