Table of Contents

Struct MercatorRect

Namespace
LansMap.Core.Geo

A square extent in normalized Web Mercator, typically a tile footprint.

public readonly struct MercatorRect
Inherited Members

Remarks

Square rather than a general rectangle because this describes tile footprints, and a tile is always square: at zoom z its edge is 1 / 2^z of the world. Y increases southward, so MinY is the NORTH edge, not the bottom one.

Constructors

MercatorRect(double, double, double)

Creates a square extent. No range validation.

public MercatorRect(double minX, double minY, double size)

Parameters

minX double

West edge, normalized mercator.

minY double

North edge, normalized mercator.

size double

Edge length, normalized mercator.

Properties

MinX

West edge, in normalized mercator (0 to 1).

public double MinX { get; }

Property Value

double

MinY

North edge, in normalized mercator (0 to 1). Y grows southward, so this is the smaller coordinate but the upper edge on screen.

public double MinY { get; }

Property Value

double

Size

Edge length in normalized mercator. For a tile at zoom z this is 1 / 2^z.

public double Size { get; }

Property Value

double