Skip to content

MapProjection

Records the map projection and the size of the pixels in a layer.

This superceeeds the old PixelScale class, which will be removed in version 2.0.

Parameters:

Name Type Description Default
name

The map projection used in WKT format, or as "epsg:xxxx" or "esri:xxxx".

required
xstep float

The number of units horizontal distance a step of one pixel makes in the map projection.

required
ystep float

The number of units vertical distance a step of one pixel makes in the map projection.

required

Attributes:

Name Type Description
name str

The map projection used in WKT format.

xstep

The number of units horizontal distance a step of one pixel makes in the map projection.

ystep

The number of units vertical distance a step of one pixel makes in the map projection.

Examples:

Create a map projection using an EPSG code:

>>> proj_wgs84 = MapProjection("epsg:4326", 0.001, -0.001)

Create a projection using an ESRI code:

>>> proj_esri = MapProjection("esri:54030", 1000, -1000)