class CoordTransform(source, target)
Represents a coordinate system transform. It is initialized with two SpatialReference
, representing the source and target coordinate systems, respectively. These objects should be used when performing the same coordinate transformation repeatedly on different geometries:
>>> ct = CoordTransform(SpatialReference('WGS84'), SpatialReference('NAD83')) >>> for feat in layer: ... geom = feat.geom # getting clone of feature geometry ... geom.transform(ct) # transforming
Please login to continue.