mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Lazy loading of GEOS functions
This commit is contained in:
parent
143255c8bb
commit
61d09e61f5
11 changed files with 345 additions and 372 deletions
|
@ -23,14 +23,14 @@ if HAS_GEOS:
|
|||
class DistanceTest(TestCase):
|
||||
fixtures = ['initial']
|
||||
|
||||
if HAS_GEOS:
|
||||
def setUp(self):
|
||||
# A point we are testing distances with -- using a WGS84
|
||||
# coordinate that'll be implicitly transformed to that to
|
||||
# the coordinate system of the field, EPSG:32140 (Texas South Central
|
||||
# w/units in meters)
|
||||
stx_pnt = GEOSGeometry('POINT (-95.370401017314293 29.704867409475465)', 4326)
|
||||
self.stx_pnt = GEOSGeometry('POINT (-95.370401017314293 29.704867409475465)', 4326)
|
||||
# Another one for Australia
|
||||
au_pnt = GEOSGeometry('POINT (150.791 -34.4919)', 4326)
|
||||
self.au_pnt = GEOSGeometry('POINT (150.791 -34.4919)', 4326)
|
||||
|
||||
def get_names(self, qs):
|
||||
cities = [c.name for c in qs]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue