'Testing GeoQuerySet.length() on 3D fields.'

def test_length(self):

    self._load_interstate_data()
    tol = 3
    ref_length_2d = 4368.1721949481
    ref_length_3d = 4368.62547052088
    self.assertAlmostEqual(ref_length_2d, Interstate2D.objects.length().get(name=u'I-45').length.m, tol)
    self.assertAlmostEqual(ref_length_3d, Interstate3D.objects.length().get(name=u'I-45').length.m, tol)
    ref_length_2d = 4367.71564892392
    ref_length_3d = 4368.16897234101
    self.assertAlmostEqual(ref_length_2d, InterstateProj2D.objects.length().get(name=u'I-45').length.m, tol)
    self.assertAlmostEqual(ref_length_3d, InterstateProj3D.objects.length().get(name=u'I-45').length.m, tol)
