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

882 lines
28 KiB
HTML
Raw Normal View History

<?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.Coord</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;Coord
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
</table>
</td>
</tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Coord</h1><p class="nomargin-top"></p>
<pre class="base-tree">
object --+
|
??.instance --+
|
<strong class="uidshort">Coord</strong>
</pre>
<dl><dt>Known Subclasses:</dt>
<dd>
<ul class="subclass-list">
<li class="private">_Coord</li> </ul>
</dd></dl>
<hr />
<p>Represents a point with two coordinates (either lon/lat or x/y).</p>
<p>Following operators are defined for Coord:</p>
<p>Addition and subtraction of Coord objects:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>Coord(10, 10) + Coord(20, 20)
<span class="py-output">Coord(30.0, 30.0)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>Coord(10, 10) - Coord(20, 20)
<span class="py-output">Coord(-10.0, -10.0)</span></pre>
<p>Addition, subtraction, multiplication and division between a Coord and
a float:</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>Coord(10, 10) + 1
<span class="py-output">Coord(11.0, 11.0)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>Coord(10, 10) - 1
<span class="py-output">Coord(-9.0, -9.0)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>Coord(10, 10) * 2
<span class="py-output">Coord(20.0, 20.0)</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>Coord(10, 10) / 2
<span class="py-output">Coord(5.0, 5.0)</span></pre>
<p>Equality of coords (as pairwise equality of components): &gt;&gt;&gt;
Coord(10, 10) is Coord(10, 10) False &gt;&gt;&gt; Coord(10, 10) ==
Coord(10, 10) True</p>
<!-- ==================== 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.Coord-class.html#__add__" class="summary-sig-name">__add__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__add__( (Coord)arg1, (Coord)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.Coord-class.html#__div__" class="summary-sig-name">__div__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__div__( (Coord)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.Coord-class.html#__eq__" class="summary-sig-name">__eq__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__eq__( (Coord)arg1, (Coord)arg2) -&gt; object :</td>
<td align="right" valign="top">
2009-07-08 22:33:16 +00:00
</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.Coord-class.html#__getinitargs__" class="summary-sig-name">__getinitargs__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__getinitargs__( (Coord)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.Coord-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__init__( (object)arg1, (float)x, (float)y) -&gt; None :
Constructs a new point with the given coordinates.</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.Coord-class.html#__mul__" class="summary-sig-name">__mul__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__mul__( (Coord)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.Coord-class.html#__radd__" class="summary-sig-name">__radd__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__radd__( (Coord)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.Coord-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.Coord-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.Coord-class.html#__rmul__" class="summary-sig-name">__rmul__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__rmul__( (Coord)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.Coord-class.html#__sub__" class="summary-sig-name">__sub__</a>(<span class="summary-sig-arg">...</span>)</span><br />
__sub__( (Coord)arg1, (Coord)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.Coord-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 point from the geographic coordinate
space into the cartesian space.</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.Coord-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 point from the cartesian space
into the geographic space.</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="24">24</code>
</td>
</tr>
2009-07-08 22:33:16 +00:00
<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.Coord-class.html#x" class="summary-name">x</a><br />
Gets or sets the x/lon coordinate of the point.
</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.Coord-class.html#y" class="summary-name">y</a><br />
Gets or sets the y/lat coordinate of the point.
</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__( (Coord)arg1, (Coord)arg2) -&gt; object :
C++ signature :
_object* __add__(mapnik::coord&lt;double, 2&gt; {lvalue},mapnik::coord&lt;double, 2&gt;)
__add__( (Coord)arg1, (float)arg2) -&gt; object :
C++ signature :
_object* __add__(mapnik::coord&lt;double, 2&gt; {lvalue},float)
</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__( (Coord)arg1, (float)arg2) -&gt; object :
C++ signature :
_object* __div__(mapnik::coord&lt;double, 2&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__( (Coord)arg1, (Coord)arg2) -&gt; object :
C++ signature :
_object* __eq__(mapnik::coord&lt;double, 2&gt; {lvalue},mapnik::coord&lt;double, 2&gt;)
2009-07-08 22:33:16 +00:00
</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__( (Coord)arg1) -&gt; tuple :
C++ signature :
boost::python::tuple __getinitargs__(mapnik::coord&lt;double, 2&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)x, (float)y) -&gt; None :
Constructs a new point with the given coordinates.
C++ signature :
void __init__(_object*,double,double)
</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__( (Coord)arg1, (float)arg2) -&gt; object :
C++ signature :
_object* __mul__(mapnik::coord&lt;double, 2&gt; {lvalue},float)
</pre>
<dl class="fields">
</dl>
</td></tr></table>
</div>
<a name="__radd__"></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">__radd__</span>(<span class="sig-arg">...</span>)</span>
<br /><em class="fname">(Right-side addition operator)</em>
</h3>
</td><td align="right" valign="top"
>&nbsp;
</td>
</tr></table>
<pre class="literalblock">
__radd__( (Coord)arg1, (float)arg2) -&gt; object :
C++ signature :
_object* __radd__(mapnik::coord&lt;double, 2&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__( (Coord)arg1, (float)arg2) -&gt; object :
C++ signature :
_object* __rmul__(mapnik::coord&lt;double, 2&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__( (Coord)arg1, (Coord)arg2) -&gt; object :
C++ signature :
_object* __sub__(mapnik::coord&lt;double, 2&gt; {lvalue},mapnik::coord&lt;double, 2&gt;)
__sub__( (Coord)arg1, (float)arg2) -&gt; object :
C++ signature :
_object* __sub__(mapnik::coord&lt;double, 2&gt; {lvalue},float)
</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 point from the geographic coordinate
space into the cartesian space. The x component is
considered to be longitude, the y component the
latitude.
Returns the easting (x) and northing (y) as a
coordinate pair.
Example: Project the geographic coordinates of the
city center of Stuttgart into the local
map projection (GK Zone 3/DHDN, EPSG 31467)
&gt;&gt;&gt; p = Projection('+init=epsg:31467')
&gt;&gt;&gt; Coord(9.1, 48.7).forward(p)
Coord(3507360.12813,5395719.2749)
</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 point from the cartesian space
into the geographic space. The x component is
considered to be the easting, the y component
to be the northing.
Returns the longitude (x) and latitude (y) as a
coordinate pair.
Example: Project the cartesian coordinates of the
city center of Stuttgart in the local
map projection (GK Zone 3/DHDN, EPSG 31467)
into geographic coordinates:
&gt;&gt;&gt; p = Projection('+init=epsg:31467')
&gt;&gt;&gt; Coord(3507360.12813,5395719.2749).inverse(p)
Coord(9.1, 48.7)
</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="x"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">x</h3>
<p>Gets or sets the x/lon coordinate of the point.</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>
<dt>Set 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="y"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">y</h3>
<p>Gets or sets the y/lat coordinate of the point.</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>
<dt>Set 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>