.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Tirex::Metatile 3pm" .TH Tirex::Metatile 3pm "2021-10-07" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Tirex::Metatile \- A Metatile .SH "SYNOPSIS" .IX Header "SYNOPSIS" my \f(CW$mt\fR = Tirex::Metatile\->new( map => 'osm', x => 16, y => 12, z=> 12 ); .SH "DESCRIPTION" .IX Header "DESCRIPTION" A metatile. .SH "METHODS" .IX Header "METHODS" .SS "Tirex::Metatile\->new( ... )" .IX Subsection "Tirex::Metatile->new( ... )" Create new metatile object. .PP A metatile always needs the following parameters: .PP .Vb 4 \& map the map config to use for rendering \& x metatile x coordinate \& y metatile y coordinate \& z zoom level .Ve .PP You can give any x and y coordinate in the range 0 .. 2^z\-1. It will be rounded down to the next tile coordinate. .PP Croaks if there is a problem with the parameters. .ie n .SS "Tirex::Metatile\->new_from_filename_and_map($filename, $map)" .el .SS "Tirex::Metatile\->new_from_filename_and_map($filename, \f(CW$map\fP)" .IX Subsection "Tirex::Metatile->new_from_filename_and_map($filename, $map)" Create metatile from filename. The first directory element must be the zoom level. .PP Optionally, the filename can start with '/' or './'. .ie n .SS "Tirex::Metatile\->new_from_lon_lat(map => $map, lon => $lon, lat => $lat, z => $z)" .el .SS "Tirex::Metatile\->new_from_lon_lat(map => \f(CW$map\fP, lon => \f(CW$lon\fP, lat => \f(CW$lat\fP, z => \f(CW$z\fP)" .IX Subsection "Tirex::Metatile->new_from_lon_lat(map => $map, lon => $lon, lat => $lat, z => $z)" Create metatile from zoom, longitude, and latitude. .ie n .SS "$mt\->\fBget_x()\fP" .el .SS "\f(CW$mt\fP\->\fBget_x()\fP" .IX Subsection "$mt->get_x()" Get x coordinate. .ie n .SS "$mt\->\fBget_y()\fP" .el .SS "\f(CW$mt\fP\->\fBget_y()\fP" .IX Subsection "$mt->get_y()" Get y coordinate. .ie n .SS "$mt\->\fBget_x()\fP" .el .SS "\f(CW$mt\fP\->\fBget_x()\fP" .IX Subsection "$mt->get_x()" Get zoom. .ie n .SS "$mt\->\fBget_map()\fP" .el .SS "\f(CW$mt\fP\->\fBget_map()\fP" .IX Subsection "$mt->get_map()" Get map. .ie n .SS "$mt\->\fBto_s()\fP" .el .SS "\f(CW$mt\fP\->\fBto_s()\fP" .IX Subsection "$mt->to_s()" Return string describing this metatile in the format \&'map=MAP z=Z x=X y=Y' .ie n .SS "$mt\->equals($other_metatile)" .el .SS "\f(CW$mt\fP\->equals($other_metatile)" .IX Subsection "$mt->equals($other_metatile)" Returns true if both metatiles are the same, false otherwise. .PP The same tile means: same map, same x and y coordinates and same zoom level. .ie n .SS "$mt\->\fBup()\fP" .el .SS "\f(CW$mt\fP\->\fBup()\fP" .IX Subsection "$mt->up()" Return the metatile one zoom level above this metatile that contains this metatile. .ie n .SS "$mt\->\fBget_filename()\fP" .el .SS "\f(CW$mt\fP\->\fBget_filename()\fP" .IX Subsection "$mt->get_filename()" Return filename for this metatile. .PP Format is something like: [zoom]/[path].meta .PP .Vb 3 \& zoom zoom level \& path path with 4 directory elements and a filename \& based on x and y coordinates .Ve .ie n .SS "$mt\->\fBexists()\fP" .el .SS "\f(CW$mt\fP\->\fBexists()\fP" .IX Subsection "$mt->exists()" Does the metatile file for this metatile exist? .ie n .SS "$mt\->older($time)" .el .SS "\f(CW$mt\fP\->older($time)" .IX Subsection "$mt->older($time)" Is the metatile file older than the given time? .PP Returns 2 if the file doesn't exist. .ie n .SS "$mt\->newer($time)" .el .SS "\f(CW$mt\fP\->newer($time)" .IX Subsection "$mt->newer($time)" Is the metatile file newer than the given time? .PP Returns 2 if the file doesn't exist. .ie n .SS "$mt\->\fBsize()\fP" .el .SS "\f(CW$mt\fP\->\fBsize()\fP" .IX Subsection "$mt->size()" Return size of the metatile file.