MCPcopy
hub / github.com/django/django / CoordTransform

Class CoordTransform

django/contrib/gis/gdal/srs.py:352–368  ·  view source on GitHub ↗

The coordinate system transformation object.

Source from the content-addressed store, hash-verified

350
351
352class CoordTransform(GDALBase):
353 "The coordinate system transformation object."
354
355 destructor = capi.destroy_ct
356
357 def __init__(self, source, target):
358 "Initialize on a source and target SpatialReference objects."
359 if not isinstance(source, SpatialReference) or not isinstance(
360 target, SpatialReference
361 ):
362 raise TypeError("source and target must be of type SpatialReference")
363 self.ptr = capi.new_ct(source._ptr, target._ptr)
364 self._srs1_name = source.name
365 self._srs2_name = target.name
366
367 def __str__(self):
368 return 'Transform from "%s" to "%s"' % (self._srs1_name, self._srs2_name)

Callers 4

coord_transformMethod · 0.90
get_dump_objectMethod · 0.90
test_srs_transformMethod · 0.90
test12_coordtransformMethod · 0.90

Calls

no outgoing calls

Tested by 2

test_srs_transformMethod · 0.72
test12_coordtransformMethod · 0.72