-
Notifications
You must be signed in to change notification settings - Fork 1
/
APIs.json
158 lines (158 loc) · 5.56 KB
/
APIs.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
[
{
"label": "OSM Roads",
"type": "J",
"title": "Roads from OpenStreetMap",
"radius": 1,
"style": "junctionmarker",
"url": "'https://overpass.kumi.systems/api/interpreter?data=[out:json];way[\"highway\"~\".\"]('+(mapCentre.lat-tolerance.lat)+','+(mapCentre.lng-tolerance.lng)+','+(mapCentre.lat+tolerance.lat)+','+(mapCentre.lng+tolerance.lng)+');(._;node(w););out;'",
"headers": {
"Accept": "application/json"
},
"datakey": "junctions",
"coordinates": "[feature.lon,feature.lat]",
"name": "feature.id",
"lpMappings": [
{
"links": "{\"type\": \"exactMatch\",\"identifier\": \"http://www.openstreetmap.org/node/\"+newbody.id+\"/\"}"
},
{
"geometry.citations": "{\"@id\":\"http://www.openstreetmap.org/node/\"+newbody.id+\"/\",\"label\":\"© OpenStreetMap contributors\"}"
}
]
},
{
"label": "GeoCode (GeoNames)",
"type": "G",
"title": "Up to 50 toponyms from the GeoNames database: uses Place-name Filter if selected.",
"url_findNearby": "'https://secure.geonames.org/findNearbyJSON?lat='+mapCentre.lat+'&lng='+mapCentre.lng+'&radius='+radius+'&username='+geoNamesID+'&maxRows=50'",
"url": "'https://secure.geonames.org/searchJSON?q='+geocodeQ+'&east='+bounds._ne.lng+'&west='+bounds._sw.lng+'&north='+bounds._ne.lat+'&south='+bounds._sw.lat+'&fuzzy=1&username='+geoNamesID+'&maxRows=50'",
"headers": {
"Accept": "application/json"
},
"datakey": "geonames",
"coordinates": "[feature.lng,feature.lat]",
"name": "feature.toponymName",
"lpMappings": [
{
"links": "{\"type\": \"closeMatch\",\"identifier\": \"https://www.geonames.org/\"+newbody.geonameId+\"/\"}"
}
]
},
{
"label": "Wikipedia (from GeoNames)",
"type": "WP",
"title": "Wikipedia articles linked from the GeoNames database",
"url": "'https://secure.geonames.org/findNearbyWikipediaJSON?lat='+mapCentre.lat+'&lng='+mapCentre.lng+'&radius='+radius+'&username='+geoNamesID+'&maxRows=50'",
"headers": {
"Accept": "application/json"
},
"datakey": "geonames",
"coordinates": "[feature.lng,feature.lat]",
"name": "feature.title",
"lpMappings": [
{
"links": "{\"type\": \"primaryTopicOf\",\"identifier\": \"https://\"+newbody.wikipediaUrl}"
},
{
"descriptions": "{\"@id\": \"https://\"+newbody.wikipediaUrl,\"value\": newbody.summary,\"lang\": \"en\"}"
}
]
},
{
"label": "Geograph",
"type": "GG",
"title": "Photographs sourced from Geograph",
"url": "'https://api.geograph.org.uk/syndicator.php?format=JSON&text='+geocodeQ+'&location='+mapCentre.lat+','+mapCentre.lng+'&distance='+(radius*5)+'&perpage=100&key='+geographKey",
"headers": {
"Accept": "application/json"
},
"datakey": "items",
"coordinates": "[feature.long,feature.lat]",
"name": "'<img class=\"popupimage\" src=\"'+feature.thumb+'\" /><br/>'+feature.title",
"lpMappings": [
{
"links": "{\"type\": \"primaryTopicOf\",\"identifier\": newbody.link}"
},
{
"depictions": "{\"@id\": newbody.link,\"title\": newbody.title,\"license\": newbody.licence}"
}
]
},
{
"label": "World Historical Gazetteer",
"type": "WH",
"title": "Features identified in the World Historical Gazetteer",
"url": "'https://whgazetteer.org/api/spatial/?type=bbox&sw='+bounds._sw.lng+','+bounds._sw.lat+'&ne='+bounds._ne.lng+','+bounds._ne.lat",
"headers": {
"Accept": "application/json"
},
"datakey": "features",
"coordinates": "firstPoint(feature.geometry)",
"name": "feature.properties.title",
"lpMappings": [
{
"links": "{\"type\": \"closeMatch\",\"identifier\": newbody.uri}"
}
]
},
{
"label": "Wikidata Settlements",
"type": "WS",
"title": "Settlements identified in Wikidata",
"url": "'https://query.wikidata.org/sparql'",
"query": "sparql_nearby_settlements.replace('%%%lng%%%',mapCentre.lng).replace('%%%lat%%%',mapCentre.lat).replace('%%%radius%%%',radius)",
"headers": {
"Accept": "application/sparql-results+json"
},
"datakey": "results.bindings",
"coordinates": "feature.geo.value.match(/-?\\d+\\.\\d+/g)",
"name": "feature.placeLabel.value",
"lpMappings": [
{
"links": "{\"type\": \"closeMatch\",\"identifier\": newbody.place.value}"
}
]
},
{
"label": "Wikidata Cultural Heritage",
"type": "WC",
"title": "Cultural Heritage sites identified in Wikidata",
"url": "'https://query.wikidata.org/sparql'",
"query": "sparql_heritage_sites.replace('%%%lng%%%',mapCentre.lng).replace('%%%lat%%%',mapCentre.lat).replace('%%%radius%%%',radius)",
"headers": {
"Accept": "application/sparql-results+json"
},
"datakey": "results.bindings",
"coordinates": "feature.geo.value.match(/-?\\d+\\.\\d+/g)",
"name": "feature.siteLabel.value",
"lpMappings": [
{
"links": "{\"type\": \"closeMatch\",\"identifier\": newbody.site.value}"
},
{
"depictions": "{\"@id\": newbody.image.value,\"title\": newbody.siteLabel.value}"
}
]
},
{
"label": "Portable Antiquities",
"type": "PA",
"title": "Archaeological finds from the Portable Antiquities Scheme (PAS) database",
"url": "'https://finds.org.uk/database/search/results/lat/'+mapCentre.lat+'/lon/'+mapCentre.lng+'/d/'+radius+'/format/geojson/page/1'",
"headers": {
"Accept": "application/json"
},
"datakey": "features",
"coordinates": "[feature.geometry.coordinates[0]+((Math.random()-.5)/5),feature.geometry.coordinates[1]+((Math.random()-.5)/5)]",
"name": "feature.properties.description",
"lpMappings": [
{
"links": "{\"type\": \"seeAlso\",\"identifier\": newbody.properties.url}"
},
{
"depictions": "{\"@id\": newbody.properties.thumbnail,\"title\": newbody.properties.description}"
}
]
}
]