NAME
TM::IP::Surface::Controller::Root - Root Controller for TM::IP::Surface
DESCRIPTION
TMIP is a suite of RESTful protocols to communicate with Topic Maps (TM) based servers. This controller deals with the surface subspace, i.e. an aspect of a topic map which visualizes its 3D structure.
Map Addressing
Like for all TMIP protocols, the topic map is addressed first using a URL structure like
http://my.server/internet/web/
where /
is the root map, internet
one submap and web
a submap under that. Underneath that mount point the surface maps reside, by selected with .surface/
:
http://my.server/internet/web/.surface/x1.png
http://my.server/internet/web/.surface/x2.png
...
http://my.server/internet/web/.surface/x9.png
The factors x1
, x2
, ..., x9
represents different zoom levels of the map. Each zoom factor has it own set of tiles, such as
http://my.server/internet/web/.surface/x3/60x40/20x3.png
The directory name 60x40 defines the number of tiles, the file name 20x3inside the directory addresses one particular tile. The tiles are autogenerated whenever they are first requested.
HTTP Methods
The operations offered by this subspace are (the __
are only to separate relevant pieces, they do not appear in URLs):
- surface GET
-
GET ...../.surface/__x__n__.png
This method retrieves the named PNG surface file. The resolution factor
n
can be from1
to9
. Only PNG is supported. - surface PUT
-
PUT ...../.surface/__x__n__.png
This method takes the message body, tests whether this is a PNG file (currently looking only at the
Content-Type
header) and tries to store that as the surface with the given zoom factor (that between1
and9
). If the file already exists, it will be overwritten. - tile GET
-
GET ...../.surface/__x__n__/__nxm__/__nxm__.png
This method retrieves the addressed tile from the surface. Each zoom factor
n
has its own directory. In that is one directory for one set of tiles, depending on the size of the tiles. Each tile inside one such set is addressed by its coordinate, (0, 0) being the the left-top tile.
AUTHOR
Robert Barta, <rho at devc.at>
SEE ALSO
http://kill.devc.at/internet/semantic-web/topic-maps/tmip
COPYRIGHT & LICENSE
Copyright 200[9] Robert Barta, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.