srs
¶
Functions:
-
centeredLAEA–Load a Lambert-Azimuthal-Equal_Area spatial reference system (SRS) centered
-
loadSRS–Load a spatial reference system (SRS) from various sources.
-
tileIndexAt–Get the "slippery tile" index at the given zoom, around the
-
xyTransform–Transform xy points between coordinate systems.
centeredLAEA
¶
Load a Lambert-Azimuthal-Equal_Area spatial reference system (SRS) centered on a given set of latitude and longitude coordinates. Alternatively, a geom can be passed to center the LAEA on.
Parameters:
-
(lon¶float, default:None) –The longitude of the projection's center. Required if no geom is given.
-
(lat¶float, default:None) –The latitude of the projection's center. Required if no geom is given.
-
–geom¶The region shape to center the LAEA in. If given, lat and lon must not be given, instead they will be defined automatically as the coordinates of the region centroid.
Returns:
-
SpatialReference–
Source code in geokit/core/srs.py
loadSRS
¶
Load a spatial reference system (SRS) from various sources.
Parameters:
-
(source¶str | int | SpatialReference | None) –The SRS to load. Can be: * osr.SpatialReference object * EPSG integer ID * Standardized SRS string like 'EPSG:4326' * Common SRS name in SRSCOMMON (e.g. 'europe_laea') * WKT string * 'laea' — creates a Lambert Azimuthal Equal Area projection (optionally centered on a geometry)
-
(geom¶Geometry, default:None) –Geometry to center the projection on if 'laea' is used.
-
–**kwargs¶Passed directly to
SRSCOMMON.laea(**kwargs), allowing customization such aslon,lat, orname.
Returns:
-
SpatialReference–
Source code in geokit/core/srs.py
tileIndexAt
¶
Get the "slippery tile" index at the given zoom, around the coordinates ('x', 'y') within the specified 'srs'.
Source code in geokit/core/srs.py
xyTransform
¶
xyTransform(
*args,
toSRS: srs_input,
fromSRS: srs_input,
outputFormat: Literal["raw", "xy", "xyz"] = "raw",
) -> (
list[tuple] | TransformedPointsXY | TransformedPointsXYZ
)
Transform xy points between coordinate systems.
Returns:
-
list of tuples, or namedtuple–- See the point for the 'outputFormat' argument