'Create 3 points (2 on west, 1 on east hemisphere) and retrieve as topojson.
2 points should be returned in western hemisphere and 1 on eastern at zoom level 1
(clip on)'

def test_points_topojson(self):

    self.defineGeometry('POINT')
    point_sf = Point((-122.4183), 37.775)
    point_berlin = Point(13.4127, 52.5233)
    point_lima = Point((-77.0283), 12.0433)
    self.insertTestRow(point_sf.wkt, 'San    Francisco')
    self.insertTestRow(point_berlin.wkt, 'Berlin')
    self.insertTestRow(point_lima.wkt, 'Lima')
    (tile_mimetype, tile_content) = utils.request(self.config_file_content, 'vectile_test', 'topojson', 0, 0, 1)
    topojson_result = json.loads(tile_content.decode('utf8'))
    self.assertTrue(tile_mimetype.endswith('/json'))
    print(topojson_result)
    self.assertEqual(topojson_result['type'], 'Topology')
    self.assertEqual(len(topojson_result['objects']['vectile']['geometries']), 2)
    cities = []
    topojson_xform = get_topo_transform(topojson_result)
    for feature in topojson_result['objects']['vectile']['geometries']:
        (lon, lat) = topojson_xform(feature['coordinates'])
        if (feature['properties']['name'] == 'San    Francisco'):
            cities.append(feature['properties']['name'])
            self.assertTrue((hypot((point_sf.x - lon), (point_sf.y - lat)) < 1))
        elif (feature['properties']['name'] == 'Lima'):
            cities.append(feature['properties']['name'])
            print(feature['coordinates'])
            self.assertTrue((hypot((point_lima.x - lon), (point_lima.y - lat)) < 1))
    self.assertTrue(('San    Francisco' in cities))
    self.assertTrue(('Lima' in cities))
    (tile_mimetype, tile_content) = utils.request(self.config_file_content, 'vectile_test', 'topojson', 0, 1, 1)
    topojson_result = json.loads(tile_content.decode('utf8'))
    self.assertTrue(tile_mimetype.endswith('/json'))
    self.assertEqual(topojson_result['type'], 'Topology')
    self.assertEqual(len(topojson_result['objects']['vectile']['geometries']), 1)
    self.assertTrue(('Berlin' in topojson_result['objects']['vectile']['geometries'][0]['properties']['name']))
