/usr/share/doc/tilestache/html/TileStache.Goodies.Proj4Projection.html is in tilestache 1.49.8-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module TileStache.Goodies.Proj4Projection</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="TileStache.html"><font color="#ffffff">TileStache</font></a>.<a href="TileStache.Goodies.html"><font color="#ffffff">Goodies</font></a>.Proj4Projection</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a></font></td></tr></table>
<p><tt>Projection that supports any projection that can be expressed in Proj.4 format.<br>
<br>
The projection is configured by a projection definition in the Proj.4<br>
format, the resolution of the zoom levels that the projection should<br>
support, the tile size, and a transformation that defines how to tile<br>
coordinates are calculated.<br>
<br>
An example, instantiating a projection for EPSG:2400 (RT90 2.5 gon W):<br>
<br>
<a href="#Proj4Projection">Proj4Projection</a>('+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1'<br>
+' +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs',<br>
[8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1],<br>
transformation=Transformation(1, 0, 0, 0, -1, 0))<br>
<br>
This example defines 14 zoom levels, where each level doubles the<br>
resolution, where the most zoomed out level uses 8192 projected units<br>
(meters, in this case) per pixel. The tiles are adressed using XYZ scheme,<br>
with the origin at (0, 0): the x component of the transformation is 1, the<br>
y component is -1 (tile rows increase from north to south). Tile size<br>
defaults to 256x256 pixels.<br>
<br>
The same projection, included in a TileStache configuration file:<br>
<br>
"example":<br>
{<br>
"provider": {"name": "mapnik", "mapfile": "examples/style.xml"},<br>
"projection": "TileStache.Goodies.<a href="#Proj4Projection">Proj4Projection</a>:<a href="#Proj4Projection">Proj4Projection</a>('+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs', [8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1], transformation=Transformation(1, 0, 0, 0, -1, 0))"<br>
}<br>
<br>
"Module:Class()" syntax described in <a href="http://tilestache.org/doc/#projections">http://tilestache.org/doc/#projections</a>.<br>
<br>
For more details about tiling, projections, zoom levels and transformations,<br>
see <a href="http://blog.kartena.se/local-projections-in-a-world-of-spherical-mercator/">http://blog.kartena.se/local-projections-in-a-world-of-spherical-mercator/</a></tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="TileStache.html">TileStache</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="ModestMaps.Geo.html#LinearProjection">ModestMaps.Geo.LinearProjection</a>(<a href="ModestMaps.Geo.html#IProjection">ModestMaps.Geo.IProjection</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="TileStache.Goodies.Proj4Projection.html#Proj4Projection">Proj4Projection</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Proj4Projection">class <strong>Proj4Projection</strong></a>(<a href="ModestMaps.Geo.html#LinearProjection">ModestMaps.Geo.LinearProjection</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Projection that supports any projection that can be expressed in Proj.4 format.<br>
<br>
Required attributes:<br>
<br>
srs:<br>
The Proj.4 definition of the projection to use, as a string<br>
<br>
resolutions:<br>
An array of the zoom levels' resolutions, expressed as the number<br>
of projected units per pixel on each zoom level. The array is ordered<br>
with outermost zoom level first (0 is most zoomed out).<br>
<br>
Optional attributes:<br>
<br>
tile_size:<br>
The size of a tile in pixels, default is 256.<br>
<br>
transformation:<br>
Transformation to apply to the projected coordinates to convert them<br>
to tile coordinates. Defaults to Transformation(1, 0, 0, 1, 0), which<br>
gives row = projected_y * scale, column = projected_x * scale<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="TileStache.Goodies.Proj4Projection.html#Proj4Projection">Proj4Projection</a></dd>
<dd><a href="ModestMaps.Geo.html#LinearProjection">ModestMaps.Geo.LinearProjection</a></dd>
<dd><a href="ModestMaps.Geo.html#IProjection">ModestMaps.Geo.IProjection</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Proj4Projection-__init__"><strong>__init__</strong></a>(self, srs, resolutions, tile_size<font color="#909090">=256</font>, transformation<font color="#909090">=<ModestMaps.Geo.Transformation instance at 0x106434368></font>)</dt><dd><tt>Creates a new instance with the projection specified in srs, which is in Proj4<br>
format.</tt></dd></dl>
<dl><dt><a name="Proj4Projection-coordinateLocation"><strong>coordinateLocation</strong></a>(self, coord)</dt><dd><tt>TODO: write me.</tt></dd></dl>
<dl><dt><a name="Proj4Projection-coordinateProj"><strong>coordinateProj</strong></a>(self, coord)</dt><dd><tt>Convert from Coordinate object to a Point object in the defined projection</tt></dd></dl>
<dl><dt><a name="Proj4Projection-findZoom"><strong>findZoom</strong></a>(self, resolution)</dt></dl>
<dl><dt><a name="Proj4Projection-locationCoordinate"><strong>locationCoordinate</strong></a>(self, location)</dt></dl>
<dl><dt><a name="Proj4Projection-locationProj"><strong>locationProj</strong></a>(self, location)</dt><dd><tt>Convert from Location object to a Point object in the defined projection</tt></dd></dl>
<dl><dt><a name="Proj4Projection-projCoordinate"><strong>projCoordinate</strong></a>(self, point, zoom<font color="#909090">=None</font>)</dt><dd><tt>Convert from Point object in the defined projection to a Coordinate object</tt></dd></dl>
<dl><dt><a name="Proj4Projection-projLocation"><strong>projLocation</strong></a>(self, point)</dt><dd><tt>Convert from Point object in the defined projection to a Location object</tt></dd></dl>
<dl><dt><a name="Proj4Projection-project"><strong>project</strong></a>(self, point, scale)</dt></dl>
<dl><dt><a name="Proj4Projection-unproject"><strong>unproject</strong></a>(self, point, scale)</dt></dl>
<hr>
Methods inherited from <a href="ModestMaps.Geo.html#LinearProjection">ModestMaps.Geo.LinearProjection</a>:<br>
<dl><dt><a name="Proj4Projection-rawProject"><strong>rawProject</strong></a>(self, point)</dt></dl>
<dl><dt><a name="Proj4Projection-rawUnproject"><strong>rawUnproject</strong></a>(self, point)</dt></dl>
</td></tr></table></td></tr></table>
</body></html>
|