/usr/share/doc/tilestache/html/TileStache.Goodies.Providers.SolrGeoJSON.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 132 133 134 135 136 137 | <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module TileStache.Goodies.Providers.SolrGeoJSON</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>.<a href="TileStache.Goodies.Providers.html"><font color="#ffffff">Providers</font></a>.SolrGeoJSON</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><a href="#Provider">Provider</a> that returns GeoJSON data responses from Solr spatial queries.<br>
<br>
This is an example of a provider that does not return an image, but rather<br>
queries a Solr instance for raw data and replies with a string of GeoJSON.<br>
<br>
Read more about the GeoJSON spec at: <a href="http://geojson.org/geojson-spec.html">http://geojson.org/geojson-spec.html</a><br>
<br>
Caveats:<br>
<br>
Example TileStache provider configuration:<br>
<br>
"solr": {<br>
"provider": {"class": "TileStache.Goodies.Providers.SolrGeoJSON.<a href="#Provider">Provider</a>",<br>
"kwargs": {<br>
"solr_endpoint": "<a href="http://localhost:8983/solr/example">http://localhost:8983/solr/example</a>",<br>
"solr_query": "*:*",<br>
}}<br>
}<br>
<br>
The following optional parameters are also supported:<br>
<br>
latitude_field: The name of the latitude field associated with your query parser;<br>
the default is 'latitude'<br>
<br>
longitude_field: The name of the longitude field associated with your query<br>
parser, default is 'longitude<br>
<br>
response_fields: A comma-separated list of fields with which to filter the Solr<br>
response; the default is '' (or: include all fields)<br>
<br>
id_field: The name name of your Solr instance's unique ID field; the default is ''.<br>
<br>
By default queries are scoped to the bounding box of a given tile. Radial queries<br>
are also supported if you supply a 'radius' kwarg to your provider and have installed<br>
the JTeam spatial plugin: <a href="http://www.jteam.nl/news/spatialsolr.html">http://www.jteam.nl/news/spatialsolr.html</a>.<br>
<br>
For example:<br>
<br>
"solr": {<br>
"provider": {"class": "TileStache.Goodies.Providers.SolrGeoJSON.<a href="#Provider">Provider</a>",<br>
"kwargs": {<br>
"solr_endpoint": "<a href="http://localhost:8983/solr/example">http://localhost:8983/solr/example</a>",<br>
"solr_query": 'foo:bar',<br>
"radius": "1",<br>
}}<br>
}<br>
<br>
Radial queries are begin at the center of the tile being rendered and distances are<br>
measured in kilometers.<br>
<br>
The following optional parameters are also supported for radial queries:<br>
<br>
query_parser: The name of the Solr query parser associated with your spatial<br>
plugin; the default is 'spatial'.</tt></p>
<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="TileStache.Goodies.Providers.SolrGeoJSON.html#Provider">Provider</a>
</font></dt><dt><font face="helvetica, arial"><a href="TileStache.Goodies.Providers.SolrGeoJSON.html#SaveableResponse">SaveableResponse</a>
</font></dt></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="Provider">class <strong>Provider</strong></a></font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Provider-__init__"><strong>__init__</strong></a>(self, layer, solr_endpoint, solr_query, **kwargs)</dt></dl>
<dl><dt><a name="Provider-getTypeByExtension"><strong>getTypeByExtension</strong></a>(self, extension)</dt><dd><tt>Get mime-type and format by file extension.<br>
<br>
This only accepts "json".</tt></dd></dl>
<dl><dt><a name="Provider-renderTile"><strong>renderTile</strong></a>(self, width, height, srs, coord)</dt><dd><tt>Render a single tile, return a <a href="#SaveableResponse">SaveableResponse</a> instance.</tt></dd></dl>
<dl><dt><a name="Provider-unproject"><strong>unproject</strong></a>(self, x, y)</dt></dl>
</td></tr></table> <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="SaveableResponse">class <strong>SaveableResponse</strong></a></font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Wrapper class for JSON response that makes it behave like a PIL.Image object.<br>
<br>
TileStache.getTile() expects to be able to save one of these to a buffer.<br> </tt></td></tr>
<tr><td> </td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SaveableResponse-__init__"><strong>__init__</strong></a>(self, content)</dt></dl>
<dl><dt><a name="SaveableResponse-save"><strong>save</strong></a>(self, out, format)</dt></dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-atan"><strong>atan</strong></a>(...)</dt><dd><tt><a href="#-atan">atan</a>(x)<br>
<br>
Return the arc tangent (measured in radians) of x.</tt></dd></dl>
<dl><dt><a name="-log"><strong>log</strong></a>(...)</dt><dd><tt><a href="#-log">log</a>(x[, base]) -> the logarithm of x to the given base.<br>
If the base not specified, returns the natural logarithm (base e) of x.</tt></dd></dl>
<dl><dt><a name="-pow"><strong>pow</strong></a>(...)</dt><dd><tt><a href="#-pow">pow</a>(x,y)<br>
<br>
Return x**y (x to the power of y).</tt></dd></dl>
<dl><dt><a name="-tan"><strong>tan</strong></a>(...)</dt><dd><tt><a href="#-tan">tan</a>(x)<br>
<br>
Return the tangent of x (measured in radians).</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td>
<td width="100%"><strong>e</strong> = 2.7182818284590451<br>
<strong>pi</strong> = 3.1415926535897931</td></tr></table>
</body></html>
|