mapnik/docs/api_docs/python/mapnik.Envelope-class.html

1318 lines
40 KiB
HTML

<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>mapnik.Envelope</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="mapnik-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://mapnik.org">mapnik</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="mapnik-module.html">Package&nbsp;mapnik</a> ::
Class&nbsp;Envelope
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Envelope</h1><p class="nomargin-top"></p>
<pre class="base-tree">
object --+
|
??.instance --+
|
<strong class="uidshort">Envelope</strong>
</pre>
<dl><dt>Known Subclasses:</dt>
<dd>
<ul class="subclass-list">
<li class="private">_Envelope</li> </ul>
</dd></dl>
<hr />
<pre class="literalblock">
Represents a spatial envelope (i.e. bounding box).
Following operators are defined for Envelope:
Addition:
e1 + e2 is equvalent to e1.expand_to_include(e2) but yields
a new envelope instead of modifying e1
Subtraction:
Currently e1 - e2 returns e1.
Multiplication and division with floats:
Multiplication and division change the width and height of the envelope
by the given factor without modifying its center..
That is, e1 * x is equivalent to:
e1.width(x * e1.width())
e1.height(x * e1.height()),
except that a new envelope is created instead of modifying e1.
e1 / x is equivalent to e1 * (1.0/x).
Equality: two envelopes are equal if their corner points are equal.
</pre>
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Instance Methods</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__add__" class="summary-sig-name">__add__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__add__( (Envelope)arg1, (Envelope)arg2) -&gt; object :</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__div__" class="summary-sig-name">__div__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__div__( (Envelope)arg1, (float)arg2) -&gt; object :</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__eq__" class="summary-sig-name">__eq__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__eq__( (Envelope)arg1, (Envelope)arg2) -&gt; object :</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__getinitargs__" class="summary-sig-name">__getinitargs__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__getinitargs__( (Envelope)arg1) -&gt; tuple :</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__init__( (object)arg1, (float)minx, (float)miny, (float)maxx, (float)maxy) -&gt; None :
Constructs a new envelope from the coordinates
of its lower left and upper right corner points.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__mul__" class="summary-sig-name">__mul__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__mul__( (Envelope)arg1, (float)arg2) -&gt; object :</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__reduce__" class="summary-sig-name">__reduce__</a>(<span class="summary-sig-arg">...</span>)</span><br />
helper for pickle</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br />
repr(x)</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__rmul__" class="summary-sig-name">__rmul__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__rmul__( (Envelope)arg1, (float)arg2) -&gt; object :</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#__sub__" class="summary-sig-name">__sub__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__sub__( (Envelope)arg1, (Envelope)arg2) -&gt; object :</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#center" class="summary-sig-name">center</a>(<span class="summary-sig-arg">...</span>)</span><br />
center( (Envelope)arg1) -&gt; Coord :
Returns the coordinates of the center of the bounding box.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#contains" class="summary-sig-name">contains</a>(<span class="summary-sig-arg">...</span>)</span><br />
contains( (Envelope)arg1, (float)x, (float)y) -&gt; bool :
Returns True iff this envelope contains the point
given by x and y.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#expand_to_include" class="summary-sig-name">expand_to_include</a>(<span class="summary-sig-arg">...</span>)</span><br />
expand_to_include( (Envelope)arg1, (float)x, (float)y) -&gt; None :
Expands this envelope to include the point given by x and y.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#forward" class="summary-sig-name">forward</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">projection</span>)</span><br />
Projects the envelope from the geographic space
into the cartesian space by projecting its corner
points.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#height" class="summary-sig-name">height</a>(<span class="summary-sig-arg">...</span>)</span><br />
height( (Envelope)arg1, (float)new_height) -&gt; None :
Sets the height to new_height of the envelope preserving its center.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#intersect" class="summary-sig-name">intersect</a>(<span class="summary-sig-arg">...</span>)</span><br />
intersect( (Envelope)arg1, (Envelope)other) -&gt; Envelope :
Returns the overlap of this envelope and the other envelope
as a new envelope.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#intersects" class="summary-sig-name">intersects</a>(<span class="summary-sig-arg">...</span>)</span><br />
intersects( (Envelope)arg1, (float)x, (float)y) -&gt; bool :
Returns True iff this envelope intersects the point
given by x and y.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#inverse" class="summary-sig-name">inverse</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">projection</span>)</span><br />
Projects the envelope from the cartesian space
into the geographic space by projecting its corner
points.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="mapnik.Envelope-class.html#width" class="summary-sig-name">width</a>(<span class="summary-sig-arg">...</span>)</span><br />
width( (Envelope)arg1, (float)new_width) -&gt; None :
Sets the width to new_width of the envelope preserving its center.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code><i>unreachable</i>.instance</code></b>:
<code>__new__</code>
</p>
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__delattr__</code>,
<code>__getattribute__</code>,
<code>__hash__</code>,
<code>__reduce_ex__</code>,
<code>__setattr__</code>,
<code>__str__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Class Variables</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="__instance_size__"></a><span class="summary-name">__instance_size__</span> = <code title="40">40</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a name="__safe_for_unpickling__"></a><span class="summary-name">__safe_for_unpickling__</span> = <code title="True">True</code>
</td>
</tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Properties</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="mapnik.Envelope-class.html#maxx" class="summary-name">maxx</a><br />
X coordinate for the upper right corner
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="mapnik.Envelope-class.html#maxy" class="summary-name">maxy</a><br />
Y coordinate for the upper right corner
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="mapnik.Envelope-class.html#minx" class="summary-name">minx</a><br />
X coordinate for the lower left corner
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type">&nbsp;</span>
</td><td class="summary">
<a href="mapnik.Envelope-class.html#miny" class="summary-name">miny</a><br />
Y coordinate for the lower left corner
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
<code>__class__</code>
</p>
</td>
</tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="__add__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__add__</span>(<span class="sig-arg">...</span>)</span>
<br /><em class="fname">(Addition operator)</em>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
__add__( (Envelope)arg1, (Envelope)arg2) -&gt; object :
C++ signature :
_object* __add__(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::Envelope&lt;double&gt;)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="__div__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__div__</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
__div__( (Envelope)arg1, (float)arg2) -&gt; object :
C++ signature :
_object* __div__(mapnik::Envelope&lt;double&gt; {lvalue},float)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="__eq__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__eq__</span>(<span class="sig-arg">...</span>)</span>
<br /><em class="fname">(Equality operator)</em>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
__eq__( (Envelope)arg1, (Envelope)arg2) -&gt; object :
C++ signature :
_object* __eq__(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::Envelope&lt;double&gt;)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="__getinitargs__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__getinitargs__</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
__getinitargs__( (Envelope)arg1) -&gt; tuple :
C++ signature :
boost::python::tuple __getinitargs__(mapnik::Envelope&lt;double&gt;)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">...</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
__init__( (object)arg1, (float)minx, (float)miny, (float)maxx, (float)maxy) -&gt; None :
Constructs a new envelope from the coordinates
of its lower left and upper right corner points.
C++ signature :
void __init__(_object*,double,double,double,double)
__init__( (object)arg1) -&gt; None :
Equivalent to Envelope(0, 0, -1, -1).
C++ signature :
void __init__(_object*)
__init__( (object)arg1, (Coord)ll, (Coord)ur) -&gt; None :
Equivalent to Envelope(ll.x, ll.y, ur.x, ur.y).
C++ signature :
void __init__(_object*,mapnik::coord&lt;double, 2&gt;,mapnik::coord&lt;double, 2&gt;)
</pre>
<dl class="fields">
<dt>Overrides:
object.__init__
</dt>
</dl>
</td></tr></table>
</div>
<a name="__mul__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__mul__</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
__mul__( (Envelope)arg1, (float)arg2) -&gt; object :
C++ signature :
_object* __mul__(mapnik::Envelope&lt;double&gt; {lvalue},float)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="__reduce__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__reduce__</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<p>helper for pickle</p>
<dl class="fields">
<dt>Overrides:
object.__reduce__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="__repr__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span>
<br /><em class="fname">(Representation operator)</em>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<p>repr(x)</p>
<dl class="fields">
<dt>Overrides:
object.__repr__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<a name="__rmul__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__rmul__</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
__rmul__( (Envelope)arg1, (float)arg2) -&gt; object :
C++ signature :
_object* __rmul__(mapnik::Envelope&lt;double&gt; {lvalue},float)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="__sub__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__sub__</span>(<span class="sig-arg">...</span>)</span>
<br /><em class="fname">(Subtraction operator)</em>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
__sub__( (Envelope)arg1, (Envelope)arg2) -&gt; object :
C++ signature :
_object* __sub__(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::Envelope&lt;double&gt;)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="center"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">center</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
center( (Envelope)arg1) -&gt; Coord :
Returns the coordinates of the center of the bounding box.
Example:
&gt;&gt;&gt; e = Envelope(0, 0, 100, 100)
&gt;&gt;&gt; e.center()
Coord(50, 50)
C++ signature :
mapnik::coord&lt;double, 2&gt; center(mapnik::Envelope&lt;double&gt; {lvalue})
center( (Envelope)arg1, (float)x, (float)y) -&gt; None :
Moves the envelope so that the given coordinates become its new center.
The width and the height are preserved.
Example:
&gt;&gt;&gt; e = Envelope(0, 0, 100, 100)
&gt;&gt;&gt; e.center(60, 60)
&gt;&gt;&gt; e.center()
Coord(60.0,60.0)
&gt;&gt;&gt; (e.width(), e.height())
(100.0, 100.0)
&gt;&gt;&gt; e
Envelope(10.0, 10.0, 110.0, 110.0)
C++ signature :
void center(mapnik::Envelope&lt;double&gt; {lvalue},double,double)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="contains"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">contains</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
contains( (Envelope)arg1, (float)x, (float)y) -&gt; bool :
Returns True iff this envelope contains the point
given by x and y.
C++ signature :
bool contains(mapnik::Envelope&lt;double&gt; {lvalue},double,double)
contains( (Envelope)arg1, (Coord)p) -&gt; bool :
Equivalent to contains(p.x, p.y)
C++ signature :
bool contains(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::coord&lt;double, 2&gt;)
contains( (Envelope)arg1, (Envelope)other) -&gt; bool :
Equivalent to:
contains(other.minx, other.miny) and contains(other.maxx, other.maxy)
C++ signature :
bool contains(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::Envelope&lt;double&gt;)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="expand_to_include"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">expand_to_include</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
expand_to_include( (Envelope)arg1, (float)x, (float)y) -&gt; None :
Expands this envelope to include the point given by x and y.
Example:
C++ signature :
void expand_to_include(mapnik::Envelope&lt;double&gt; {lvalue},double,double)
expand_to_include( (Envelope)arg1, (Coord)p) -&gt; None :
Equivalent to expand_to_include(p.x, p.y)
C++ signature :
void expand_to_include(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::coord&lt;double, 2&gt;)
expand_to_include( (Envelope)arg1, (Envelope)other) -&gt; None :
Equivalent to:
expand_to_include(other.minx, other.miny)
expand_to_include(other.maxx, other.maxy)
C++ signature :
void expand_to_include(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::Envelope&lt;double&gt;)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="forward"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">forward</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">projection</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Projects the envelope from the geographic space
into the cartesian space by projecting its corner
points.
See also:
Coord.forward(self, projection)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="height"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">height</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
height( (Envelope)arg1, (float)new_height) -&gt; None :
Sets the height to new_height of the envelope preserving its center.
Example:
&gt;&gt;&gt; e = Envelope(0, 0, 100, 100)
&gt;&gt;&gt; e.height(120)
&gt;&gt;&gt; e.center()
Coord(50.0,50.0)
&gt;&gt;&gt; e
Envelope(0.0, -10.0, 100.0, 110.0)
C++ signature :
void height(mapnik::Envelope&lt;double&gt; {lvalue},double)
height( (Envelope)arg1) -&gt; float :
Returns the height of this envelope.
C++ signature :
double height(mapnik::Envelope&lt;double&gt; {lvalue})
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="intersect"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">intersect</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
intersect( (Envelope)arg1, (Envelope)other) -&gt; Envelope :
Returns the overlap of this envelope and the other envelope
as a new envelope.
Example:
&gt;&gt;&gt; e1 = Envelope(0, 0, 100, 100)
&gt;&gt;&gt; e2 = Envelope(50, 50, 150, 150)
&gt;&gt;&gt; e1.intersect(e2)
Envelope(50.0, 50.0, 100.0, 100.0)
C++ signature :
mapnik::Envelope&lt;double&gt; intersect(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::Envelope&lt;double&gt;)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="intersects"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">intersects</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
intersects( (Envelope)arg1, (float)x, (float)y) -&gt; bool :
Returns True iff this envelope intersects the point
given by x and y.
Note: For points, intersection is equivalent
to containment, i.e. the following holds:
e.contains(x, y) == e.intersects(x, y)
C++ signature :
bool intersects(mapnik::Envelope&lt;double&gt; {lvalue},double,double)
intersects( (Envelope)arg1, (Coord)p) -&gt; bool :
Equivalent to contains(p.x, p.y)
C++ signature :
bool intersects(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::coord&lt;double, 2&gt;)
intersects( (Envelope)arg1, (Envelope)other) -&gt; bool :
Returns True iff this envelope intersects the other envelope,
This relationship is symmetric.
Example:
&gt;&gt;&gt; e1 = Envelope(0, 0, 100, 100)
&gt;&gt;&gt; e2 = Envelope(50, 50, 150, 150)
&gt;&gt;&gt; e1.intersects(e2)
True
&gt;&gt;&gt; e1.contains(e2)
False
C++ signature :
bool intersects(mapnik::Envelope&lt;double&gt; {lvalue},mapnik::Envelope&lt;double&gt;)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="inverse"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">inverse</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">projection</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
Projects the envelope from the cartesian space
into the geographic space by projecting its corner
points.
See also:
Coord.inverse(self, projection).
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="width"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">width</span>(<span class="sig-arg">...</span>)</span>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
width( (Envelope)arg1, (float)new_width) -&gt; None :
Sets the width to new_width of the envelope preserving its center.
Example:
&gt;&gt;&gt; e = Envelope(0, 0, 100, 100)
&gt;&gt;&gt; e.width(120)
&gt;&gt;&gt; e.center()
Coord(50.0,50.0)
&gt;&gt;&gt; e
Envelope(-10.0, 0.0, 110.0, 100.0)
C++ signature :
void width(mapnik::Envelope&lt;double&gt; {lvalue},double)
width( (Envelope)arg1) -&gt; float :
Returns the width of this envelope.
C++ signature :
double width(mapnik::Envelope&lt;double&gt; {lvalue})
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== PROPERTY DETAILS ==================== -->
<a name="section-PropertyDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Property Details</span></td>
</tr>
</table>
<a name="maxx"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">maxx</h3>
<p>X coordinate for the upper right corner</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><i>unreachable</i>(<span class="summary-sig-arg">...</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<a name="maxy"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">maxy</h3>
<p>Y coordinate for the upper right corner</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><i>unreachable</i>(<span class="summary-sig-arg">...</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<a name="minx"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">minx</h3>
<p>X coordinate for the lower left corner</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><i>unreachable</i>(<span class="summary-sig-arg">...</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<a name="miny"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">miny</h3>
<p>Y coordinate for the lower left corner</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><i>unreachable</i>(<span class="summary-sig-arg">...</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="mapnik-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Tree link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Index link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Help link -->
<th>&nbsp;&nbsp;&nbsp;<a
href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="http://mapnik.org">mapnik</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sun Nov 8 09:00:49 2009
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>