MCPcopy
hub / github.com/django/django / test_3d_hasz

Method test_3d_hasz

tests/gis_tests/geo3d/tests.py:146–166  ·  view source on GitHub ↗

Make sure data is 3D and has expected Z values -- shouldn't change because of coordinate system.

(self)

Source from the content-addressed store, hash-verified

144 """
145
146 def test_3d_hasz(self):
147 """
148 Make sure data is 3D and has expected Z values -- shouldn't change
149 because of coordinate system.
150 """
151 self._load_interstate_data()
152 for name, line, exp_z in interstate_data:
153 interstate = Interstate3D.objects.get(name=name)
154 interstate_proj = InterstateProj3D.objects.get(name=name)
155 for i in [interstate, interstate_proj]:
156 self.assertTrue(i.line.hasz)
157 self.assertEqual(exp_z, tuple(i.line.z))
158
159 self._load_city_data()
160 for name, pnt_data in city_data:
161 city = City3D.objects.get(name=name)
162 # Testing both geometry and geography fields
163 self.assertTrue(city.point.hasz)
164 self.assertTrue(city.pointg.hasz)
165 self.assertEqual(city.point.z, pnt_data[2])
166 self.assertEqual(city.pointg.z, pnt_data[2])
167
168 def test_3d_polygons(self):
169 """

Callers

nothing calls this directly

Calls 3

_load_interstate_dataMethod · 0.80
_load_city_dataMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected