1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "calculations": [
9 {
10 "label": "Empire State Building",
11 "type": "convert",
12 "point": "40.748440, -73.985664",
13 },
14 {
15 "label": "Eiffel Tower from degrees, minutes and seconds",
16 "type": "convert",
17 "point": "48°51'30.1\"N 2°17'40.1\"E",
18 },
19 {
20 "label": "Sydney Opera House from latitude and longitude",
21 "type": "convert",
22 "latitude": -33.856784,
23 "longitude": 151.215297,
24 },
25 {
26 "label": "Decode a geohash",
27 "type": "convert",
28 "point": "u4pruydqqvj",
29 },
30 {
31 "label": "Decode an MGRS reference",
32 "type": "convert",
33 "point": "31UDQ4825011951",
34 },
35 {
36 "label": "New York to London",
37 "type": "distance",
38 "point": "40.7128, -74.0060",
39 "point2": "51.5074, -0.1278",
40 },
41 {
42 "label": "100 km due east of Greenwich",
43 "type": "destination",
44 "point": "51.4778, -0.0015",
45 "bearing": 90,
46 "distanceKm": 100,
47 },
48 {
49 "label": "10 km bounding box around Times Square",
50 "type": "bbox",
51 "point": "40.7580, -73.9855",
52 "radiusKm": 10,
53 },
54 ] }
55
56
57run = client.actor("mangudai/gps-coordinate-converter").call(run_input=run_input)
58
59
60print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
61for item in client.dataset(run["defaultDatasetId"]).iterate_items():
62 print(item)
63
64