def testCoordsFromBounds(self): coords = geography.getCoordsFromBounds( '1.000000,123.112441,111.222222,123.456789') self.assertEqual(coords['swLat'], Decimal('1.000000')) self.assertEqual(coords['swLng'], Decimal('123.112441')) self.assertEqual(coords['neLat'], Decimal('111.222222')) self.assertEqual(coords['neLng'], Decimal('123.456789'))
def notesWithinBounds(notes, boundsString): return geography.notesWithinBounds(notes, geography.getCoordsFromBounds(boundsString))
def testCoordsFromBounds(self): coords = geography.getCoordsFromBounds('1.000000,123.112441,111.222222,123.456789') self.assertEqual(coords['swLat'], Decimal('1.000000')) self.assertEqual(coords['swLng'], Decimal('123.112441')) self.assertEqual(coords['neLat'], Decimal('111.222222')) self.assertEqual(coords['neLng'], Decimal('123.456789'))
def routesWithinBounds(routes, boundsString): return geography.routesWithinBounds(routes, geography.getCoordsFromBounds(boundsString))