Tirex::Metatile(3pm)
β¨ Tirex::Metatile β the metatile manual (Perl, bestie) β¨
okay so. you're here for Tirex::Metatile (it's a 3pm page, from the User Contributed Perl Documentation corner of the universe) and honestly? same. it's a Metatile. that's the whole vibe. let's get into it π
πΈ SYNOPSIS πΈ
my $mt = Tirex::Metatile->new( map => 'osm', x => 16, y => 12, z=> 12 );
look at her. one line, one metatile, zero drama. slay.
π DESCRIPTION π
A metatile. π that's it, that's the description. mysterious, iconic, no notes.
π METHODS π
π Tirex::Metatile->new( ... )
Creates a brand new metatile object, fresh out the box, main character energy β¨
A metatile always needs these parameters, no skipping, bestie:
mapβ the map config to use for rendering πΊοΈxβ metatile x coordinateyβ metatile y coordinatezβ zoom level π
You can give any x and y coordinate in the range 0 .. 2^z-1. and then β plot twist β it gets rounded down to the next tile coordinate. it's giving "we'll take the nearest one, don't worry about it" π
β οΈ Croaks if there is a problem with the parameters. so like, feed her bad params and she Will yell at you. respectfully.
π Tirex::Metatile->new_from_filename_and_map($filename, $map)
Builds a metatile from a filename. the first directory element must be the zoom level, that part is non-negotiable π«Ά
and optionally? the filename can start with / or ./. flexible queen.
π¦ Tirex::Metatile->new_from_lon_lat(map => $map, lon => $lon, lat => $lat, z => $z)
Creates a metatile from zoom, longitude, and latitude. coordinates-to-metatile pipeline, lowkey satisfying πβ¨
π $mt->get_x()
Gets the x coordinate. that's it. short king.
π $mt->get_y()
Gets the y coordinate. yes bestie, we're doing all of them.
π $mt->get_x()
Gets the zoom. (yes, the heading says get_x() β that's what the page says, and we do not edit the lore. iykyk π)
π $mt->get_map()
Gets the map. just the map. no thoughts, head empty.
π $mt->to_s()
Returns a string describing this metatile, in the format 'map=MAP z=Z x=X y=Y'. a little summary card for your tile π«Ά
β $mt->equals($other_metatile)
Returns true if both metatiles are the same, false otherwise. πͺ
and "the same tile" means: same map, same x and y coordinates, and same zoom level. all four or it's not a match, periodt.
π₯ $mt->up()
Returns the metatile one zoom level above this metatile that contains this metatile. yes β the parent, the bigger picture, the girlboss above her πβ¬οΈ
π§ $mt->get_filename()
Returns the filename for this metatile. π
The format is something like:
[zoom]/[path].meta
where:
zoom zoom level
path path with 4 directory elements and a filename
based on x and y coordinates
four whole directory elements, she's specific like that π
πΈ $mt->exists()
Does the metatile file for this metatile exist? π€ yes or no, that's the whole question.
π $mt->older($time)
Is the metatile file older than the given time? π°οΈ
Returns2if the file doesn't exist. (yes,2. not a typo, not a vibe, that's the rule.)
β¨ $mt->newer($time)
Is the metatile file newer than the given time? π°οΈβ¨
Returns2if the file doesn't exist. same energy, same2.
π $mt->size()
Returns the size of the metatile file. big? small? she's got the number for you π
π«Ά THE SEND-OFF π«Ά
that's the whole page bestie, every method accounted for, nothing skipped, no cap π― this little gem lives in the Tirex::Metatile(3pm) section of the User Contributed Perl Documentation, built for perl v5.40.1, and stamped 2026-08-09 β so go forth, make metatiles, and be iconic π
β¨π
π¦ where this page comes from
- ubuntu stonking: tirex 0.8.0+ds-2build3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms