LinearRing/LineString projection

This module pulls together proj, GEOS and _crs.pyx to implement a function to project a LinearRing / LineString. In general, this should never be called manually, instead leaving the processing to be done by the cartopy.crs.Projection subclasses.

class cartopy.trace.LineAccumulator
cartopy.trace.project_linear(geometry, CRS src_crs, dest_projection)

Project a geometry from one projection to another.

Parameters
  • geometry (shapely.geometry.LineString or shapely.geometry.LinearRing) – A geometry to be projected.

  • src_crs (cartopy.crs.CRS) – The coordinate system of the line to be projected.

  • dest_projection (cartopy.crs.Projection) – The projection for the resulting projected line.

Returns

shapely.geometry.MultiLineString – The result of projecting the given geometry from the source projection into the destination projection.