1map::geocode::nominatim(n) Mapping utilities map::geocode::nominatim(n)
2
3
4
5______________________________________________________________________________
6
8 map::geocode::nominatim - Resolving geographical names with a Nominatim
9 service
10
12 package require Tcl 8.5
13
14 package require http
15
16 package require json
17
18 package require uri
19
20 package require snit
21
22 package require map::geocode::nominatim ?0.1?
23
24 ::map::geocode::nominatim requestor ?-baseurl url? ?-callback callback?
25 ?-error error callback?
26
27 $cmdprefix result
28
29 $cmdprefix errorstring
30
31 requestor search query
32
33______________________________________________________________________________
34
36 This package provides a class for accessing geocoding services which
37 implement the Nominatim interface (see References)
38
40 ::map::geocode::nominatim requestor ?-baseurl url? ?-callback callback?
41 ?-error error callback?
42 Creates a geocoding request object requestor, which will send
43 its requests to the Nominatim server.
44
45 The result of the command is name.
46
47 OPTIONS
48 -baseurl url
49 The base URL of the Nominatim service. Default value is Open‐
50 StreetMap's service at http://nominatim.openstreetmap.org/search
51 A possible free alternative is at
52 http://open.mapquestapi.com//nominatim/v1/search
53
54 -callback cmdprefix
55 A command prefix to be invoked when search result become avail‐
56 able. The default setting, active when nothing was specified on
57 object creation, is to print the result (see below) to stdout.
58 The result of the command prefix is ignored. Errors thrown by
59 the command prefix are caught and cause the invokation of the
60 error callback (see option -error below), with the error message
61 as argument.
62
63 The signature of the command prefix is:
64
65 $cmdprefix result
66 The result is a list of dictionaries, containing one item
67 per hit. Each dictionary will have the following en‐
68 tries:
69
70 place_id
71 The place ID (FIXME: what's this?)
72
73 licence
74 The data licence string
75
76 osm_type
77 The OSM type of the location
78
79 osm_id FIXME
80
81 boundingbox
82 The coordinates of the bounding box (min and max
83 latitude, min and max longitude)
84
85 lat The location's latitude
86
87 lon The location's longitude
88
89 display_name
90 the location's human readable name
91
92 class FIXME
93
94 type FIXME
95
96 icon FIXME
97
98 -error cmdprefix
99 A command prefix to be invoked when encountering errors. Typi‐
100 cally these are HTTP errors. The default setting, active when
101 nothing was specified on object creation, is to print the er‐
102 rorstring (see below) to stderr. The result of the command pre‐
103 fix is ignored. Errors thrown by the command prefix are passed
104 to higher levels.
105
106 The signature of the command prefix is:
107
108 $cmdprefix errorstring
109
110 METHODS
111 requestor search query
112 This method returns a list of dictionaries, one item per hit for
113 the specified query.
114
116 [1] http://wiki.openstreetmap.org/wiki/Nominatim
117
118 [2] http://open.mapquestapi.com/nominatim/
119
121 geocoding, http, location, map, nominatim, server, url
122
123
124
125tcllib 0.1 map::geocode::nominatim(n)