DOKK / manpages / debian 12 / tirex / Tirex::Metatile.3pm.en
Tirex::Metatile(3pm) User Contributed Perl Documentation Tirex::Metatile(3pm)

Tirex::Metatile - A Metatile

my $mt = Tirex::Metatile->new( map => 'osm', x => 16, y => 12, z=> 12 );

A metatile.

Tirex::Metatile->new( ... )

Create new metatile object.

A metatile always needs the following parameters:

 map  the map config to use for rendering
 x    metatile x coordinate
 y    metatile y coordinate
 z    zoom level

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.

Croaks if there is a problem with the parameters.

Tirex::Metatile->new_from_filename_and_map($filename, $map)

Create metatile from filename. The first directory element must be the zoom level.

Optionally, the filename can start with '/' or './'.

Tirex::Metatile->new_from_lon_lat(map => $map, lon => $lon, lat => $lat, z => $z)

Create metatile from zoom, longitude, and latitude.

Get x coordinate.

Get y coordinate.

Get zoom.

Get map.

Return string describing this metatile in the format 'map=MAP z=Z x=X y=Y'

Returns true if both metatiles are the same, false otherwise.

The same tile means: same map, same x and y coordinates and same zoom level.

Return the metatile one zoom level above this metatile that contains this metatile.

Return filename for this metatile.

Format is something like:
[zoom]/[path].meta

  zoom          zoom level
  path          path with 4 directory elements and a filename
                based on x and y coordinates

Does the metatile file for this metatile exist?

Is the metatile file older than the given time?

Returns 2 if the file doesn't exist.

Is the metatile file newer than the given time?

Returns 2 if the file doesn't exist.

Return size of the metatile file.

2023-04-11 perl v5.36.0