File: map_slippy.man

package info (click to toggle)
tcllib 1.12-dfsg-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 25,336 kB
  • ctags: 7,235
  • sloc: tcl: 126,727; ansic: 10,090; sh: 9,855; xml: 1,766; yacc: 753; makefile: 127; perl: 84; f90: 84; pascal: 74; python: 33; ruby: 13; php: 11
file content (114 lines) | stat: -rw-r--r-- 3,513 bytes parent folder | download
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
[comment {-*- tcl -*- doctools manpage}]
[manpage_begin map::slippy n 0.2]
[moddesc   {Mapping utilities}]
[titledesc {Common code for slippy based map packages}]
[require Tcl 8.4]
[require Tk 8.4]
[require map::slippy [opt 0.2]]
[description]

This package provides a number of methods doing things needed by all
types of slippy-based map packages.

[section API]

[list_begin definitions]

[call [cmd ::map::slippy] [method length] [arg level]]

This method returns the width/height of a slippy-based map at the
specified zoom [arg level], in pixels. This is, in essence, the result
of

[example {
	expr { [tiles $level] * [tile size] }
}]


[call [cmd ::map::slippy] [method tiles] [arg level]]

This method returns the width/height of a slippy-based map at the
specified zoom [arg level], in [term tiles].


[call [cmd ::map::slippy] [method {tile size}]]

This method returns the width/height of a tile in a slippy-based map,
in pixels.


[call [cmd ::map::slippy] [method {tile valid}] [arg tile] \
	[arg levels] [opt [arg msgvar]]]

This method checks whether [arg tile] described a valid tile in a
slippy-based map containing that many zoom [arg levels]. The result is
a boolean value, [const true] if the tile is valid, and [const false]
otherwise. For the latter a message is left in the variable named by
[arg msgvar], should it be specified.

[para]

A tile identifier as stored in [arg tile] is a list containing zoom
level, tile row, and tile column, in this order. The command
essentially checks this, i.e. the syntax, that the zoom level is
between 0 and "[arg levels]-1", and that the row/col information is
within the boundaries for the zoom level, i.e. 0 ...
"[lb]tiles $zoom[rb]-1".


[call [cmd ::map::slippy] [method {geo 2tile}] [arg geo]]

Converts a geographical location at a zoom level ([arg geo], a list
containing zoom level, latitude, and longitude, in this order) to a
tile identifier (list containing zoom level, row, and column) at that
level.


[call [cmd ::map::slippy] [method {geo 2point}] [arg geo]]

Converts a geographical location at a zoom level ([arg geo], a list
containing zoom level, latitude, and longitude, in this order) to a
pixel position (list containing zoom level, y, and x) at that level.


[call [cmd ::map::slippy] [method {tile 2geo}] [arg tile]]

Converts a tile identifier at a zoom level ([arg tile], list
containing zoom level, row, and column) to a geographical location
(list containing zoom level, latitude, and longitude, in this order)
at that level.


[call [cmd ::map::slippy] [method {tile 2point}] [arg tile]]

Converts a tile identifier at a zoom level ([arg tile], a list
containing zoom level, row, and column, in this order) to a pixel
position (list containing zoom level, y, and x) at that level.


[call [cmd ::map::slippy] [method {point 2geo}] [arg point]]

Converts a pixel position at a zoom level ([arg point], list
containing zoom level, y, and x) to a geographical location (list
containing zoom level, latitude, and longitude, in this order) at that
level.


[call [cmd ::map::slippy] [method {point 2tile}] [arg point]]

Converts a pixel position at a zoom level ([arg point], a list
containing zoom level, y, and x, in this order) to a tile identifier
(list containing zoom level, row, and column) at that level.

[list_end]


[section References]

[list_begin enum]
[enum]	[uri http://wiki.openstreetmap.org/wiki/Main_Page]
[list_end]


[keywords slippy map location geodesy geography latitute longitude zoom]
[manpage_end]