MCPcopy
hub / github.com/django/django / test_ewkt

Method test_ewkt

tests/gis_tests/gdal_tests/test_geom.py:81–90  ·  view source on GitHub ↗

Testing EWKT input/output.

(self)

Source from the content-addressed store, hash-verified

79 self.assertEqual(g.wkt, geom.wkt)
80
81 def test_ewkt(self):
82 "Testing EWKT input/output."
83 for ewkt_val in ("POINT (1 2 3)", "LINEARRING (0 0,1 1,2 1,0 0)"):
84 # First with ewkt output when no SRID in EWKT
85 self.assertEqual(ewkt_val, OGRGeometry(ewkt_val).ewkt)
86 # No test consumption with an SRID specified.
87 ewkt_val = "SRID=4326;%s" % ewkt_val
88 geom = OGRGeometry(ewkt_val)
89 self.assertEqual(ewkt_val, geom.ewkt)
90 self.assertEqual(4326, geom.srs.srid)
91
92 def test_gml(self):
93 "Testing GML output."

Callers

nothing calls this directly

Calls 1

OGRGeometryClass · 0.90

Tested by

no test coverage detected