Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

geo::osm::tiles(3pm) [debian man page]

Geo::OSM::Tiles(3pm)					User Contributed Perl Documentation				      Geo::OSM::Tiles(3pm)

NAME
Geo::OSM::Tiles - Calculate tile numbers for OpenStreetMap SYNOPSIS
use Geo::OSM::Tiles qw( :all ); $zoom = 13; $lat = 49.60055; $lon = 11.01296; $tilex = lon2tilex($lon, $zoom); $tiley = lat2tiley($lat, $zoom); $path = tile2path($tilex, $tiley, $zoom); $tileurl = "http://tile.openstreetmap.org/$path"; DESCRIPTION
This module provides functions for calculating the path to a map tile at OpenStreetMap out of geographic coordinates. The path of a tile at OSM has the form "$zoom/$tilex/$tiley.png". The numbering scheme is documented in the OSM wiki, see the link below. "lon2tilex($lon, $zoom)" Returns $tilex for the tile at longitude $lon and zoom level $zoom. The longitude must be in the range "-180.0 <= $lon < 180.0". The zoom level must be a non-negative integer. "lat2tiley($lat, $zoom)" Returns $tiley for the tile at latitude $lat and zoom level $zoom. The latitude must be in the range "-85.0511 <= $lat <= 85.0511". The zoom level must be a non-negative integer. "tile2path($tilex, $tiley, $zoom)" Composes the path to the tile at $tilex, $tiley, and $zoom at the OSM server. $tilex and $tiley must be integers in the range "0..2**$zoom-1". The supported range of zoom levels depends on the tile server. The maximum zoom for the Osmarender layer is 17, it is 18 for the Mapnik layer. "checklonrange($lonmin, $lonmax)" Checks whether $lonmin and $lonmax are within the allowed range of the longitude argument to "lon2tilex". Returns "($lonmin, $lonmax)" unchanged if they are ok or corrected values if not. "checklatrange($latmin, $latmax)" Checks whether $latmin and $latmax are within the allowed range of the latitude argument to "lat2tiley". Returns "($latmin, $latmax)" unchanged if they are ok or corrected values if not. SEE ALSO
<http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames> AUTHOR
Rolf Krahl <rotkraut@cpan.org> COPYRIGHT AND LICENCE
Copyright (C) 2008-2010 by Rolf Krahl This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2010-05-15 Geo::OSM::Tiles(3pm)

Check Out this Related Man Page

map::slippy(n)							 Mapping utilities						    map::slippy(n)

__________________________________________________________________________________________________________________________________________________

NAME
map::slippy - Common code for slippy based map packages SYNOPSIS
package require Tcl 8.4 package require Tk 8.4 package require map::slippy ?0.3? ::map::slippy length level ::map::slippy tiles level ::map::slippy tile size ::map::slippy tile valid tile levels ?msgvar? ::map::slippy geo 2tile geo ::map::slippy geo 2point geo ::map::slippy tile 2geo tile ::map::slippy tile 2point tile ::map::slippy point 2geo point ::map::slippy point 2tile point _________________________________________________________________ DESCRIPTION
This package provides a number of methods doing things needed by all types of slippy-based map packages. API
::map::slippy length level This method returns the width/height of a slippy-based map at the specified zoom level, in pixels. This is, in essence, the result of expr { [tiles $level] * [tile size] } ::map::slippy tiles level This method returns the width/height of a slippy-based map at the specified zoom level, in tiles. ::map::slippy tile size This method returns the width/height of a tile in a slippy-based map, in pixels. ::map::slippy tile valid tile levels ?msgvar? This method checks whether tile described a valid tile in a slippy-based map containing that many zoom levels. The result is a bool- ean value, true if the tile is valid, and false otherwise. For the latter a message is left in the variable named by msgvar, should it be specified. A tile identifier as stored in tile is a list containing zoom level, tile row, and tile column, in this order. The command essen- tially checks this, i.e. the syntax, that the zoom level is between 0 and "levels-1", and that the row/col information is within the boundaries for the zoom level, i.e. 0 ... "[tiles $zoom]-1". ::map::slippy geo 2tile geo Converts a geographical location at a zoom level (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. ::map::slippy geo 2point geo Converts a geographical location at a zoom level (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. ::map::slippy tile 2geo tile Converts a tile identifier at a zoom level (tile, list containing zoom level, row, and column) to a geographical location (list con- taining zoom level, latitude, and longitude, in this order) at that level. ::map::slippy tile 2point tile Converts a tile identifier at a zoom level (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. ::map::slippy point 2geo point Converts a pixel position at a zoom level (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. ::map::slippy point 2tile point Converts a pixel position at a zoom level (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. REFERENCES
[1] http://wiki.openstreetmap.org/wiki/Main_Page KEYWORDS
geodesy, geography, latitute, location, longitude, map, slippy, zoom map 0.3 map::slippy(n)
Man Page