This repository was archived by the owner on Sep 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathpublicmapping.redistricting.utils-module.html
More file actions
334 lines (312 loc) · 13.4 KB
/
publicmapping.redistricting.utils-module.html
File metadata and controls
334 lines (312 loc) · 13.4 KB
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<?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>publicmapping.redistricting.utils</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> <a
href="publicmapping-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a href="http://publicmapping.github.com/districtbuilder/">Publicmapping on GitHub</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="publicmapping-module.html">Package publicmapping</a> ::
<a href="publicmapping.redistricting-module.html">Package redistricting</a> ::
Module utils
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="publicmapping.redistricting.utils-module.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module utils</h1><p class="nomargin-top"><span class="codelink"><a href="publicmapping.redistricting.utils-pysrc.html">source code</a></span></p>
<pre class="literalblock">
Utilities for the redistricting application: format conversion,
useful database queries, etc.
This file is part of The Public Mapping Project
https://github.com/PublicMapping/
License:
Copyright 2010 Micah Altman, Michael McDonald
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Author:
Andrew Jennings, David Zwarg
</pre>
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Classes</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Classes"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="publicmapping.redistricting.utils.DistrictFile-class.html" class="summary-name">DistrictFile</a><br />
A utility class that can check exported file status.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="publicmapping.redistricting.utils.DistrictIndexFile-class.html" class="summary-name">DistrictIndexFile</a><br />
The publicmapping projects supports users importing and exporting
their plans to district index files.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="publicmapping.redistricting.utils.DistrictShapeFile-class.html" class="summary-name">DistrictShapeFile</a><br />
The publicmapping projects supports users exporting their plans to
shape files.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="publicmapping.redistricting.utils.PlanReport-class.html" class="summary-name">PlanReport</a><br />
A collection of static methods that assist in asynchronous report
generation.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="publicmapping.redistricting.utils.CalculatorReport-class.html" class="summary-name">CalculatorReport</a><br />
A collection of static methods that assist in asynchronous report
generation for calculator-based reports.
</td>
</tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Functions</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Functions"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="publicmapping.redistricting.utils-module.html#cleanup" class="summary-sig-name">cleanup</a>()</span><br />
Clean out all the old sessions.</td>
<td align="right" valign="top">
<span class="codelink"><a href="publicmapping.redistricting.utils-pysrc.html#cleanup">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p class="indent-wrapped-lines"><b>Imports:</b>
<span title="celery.decorators.task">task</span>,
<span title="celery.task.http.HttpDispatch">HttpDispatch</span>,
<span title="django.core.management">management</span>,
<span title="django.contrib.comments.models.Comment">Comment</span>,
<span title="django.contrib.sessions.models.Session">Session</span>,
<span title="django.contrib.sites.models.Site">Site</span>,
<span title="django.core.mail.send_mail">send_mail</span>,
<span title="django.core.mail.mail_admins">mail_admins</span>,
<span title="django.core.mail.EmailMessage">EmailMessage</span>,
<span title="django.template.loader">loader</span>,
<span title="django.template.Context">DjangoContext</span>,
<span title="django.db.models.Sum">Sum</span>,
<span title="django.db.models.Min">Min</span>,
<span title="django.db.models.Max">Max</span>,
<span title="tagging.utils.parse_tag_input">parse_tag_input</span>,
<span title="tagging.models.Tag">Tag</span>,
<span title="tagging.models.TaggedItem">TaggedItem</span>,
<span title="csv">csv</span>,
<span title="zipfile">zipfile</span>,
<span title="tempfile">tempfile</span>,
<span title="os">os</span>,
<span title="sys">sys</span>,
<span title="traceback">traceback</span>,
<span title="time">time</span>,
<span title="datetime.datetime">datetime</span>,
<span title="socket">socket</span>,
<span title="urllib2">urllib2</span>,
<span title="lxml.etree">etree</span>,
<span title="lxml.objectify">objectify</span>,
<span title="glob.glob">glob</span>,
<span title="django.contrib.gis.gdal.gdal_version">gdal_version</span>,
<span title="django.contrib.gis.gdal.Envelope">Envelope</span>,
<span title="django.contrib.gis.gdal.OGRGeomType">OGRGeomType</span>,
<span title="django.contrib.gis.gdal.OGRException">OGRException</span>,
<span title="django.contrib.gis.gdal.Driver">Driver</span>,
<span title="django.contrib.gis.gdal.check_err">check_err</span>,
<span title="django.contrib.gis.gdal.GEOJSON">GEOJSON</span>,
<span title="django.contrib.gis.gdal.SpatialReference">SpatialReference</span>,
<span title="django.contrib.gis.gdal.HAS_GDAL">HAS_GDAL</span>,
<span title="django.contrib.gis.gdal.SRSException">SRSException</span>,
<span title="django.contrib.gis.gdal.GDAL_VERSION">GDAL_VERSION</span>,
<span title="django.contrib.gis.gdal.OGRIndexError">OGRIndexError</span>,
<span title="django.contrib.gis.gdal.DataSource">DataSource</span>,
<span title="django.contrib.gis.gdal.OGRGeometry">OGRGeometry</span>,
<span title="django.contrib.gis.gdal.gdal_release_date">gdal_release_date</span>,
<span title="django.contrib.gis.gdal.CoordTransform">CoordTransform</span>,
<span title="django.contrib.gis.gdal.gdal_full_version">gdal_full_version</span>,
<span title="django.contrib.gis.gdal.libgdal.lgdal">lgdal</span>,
<span title="ctypes.c_double">c_double</span>
</p><br />
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Function Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-FunctionDetails"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="cleanup"></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">cleanup</span>()</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="publicmapping.redistricting.utils-pysrc.html#cleanup">source code</a></span>
</td>
</tr></table>
<p>Clean out all the old sessions.</p>
<p>Old sessions are sessions whose expiration date is in the past.</p>
<dl class="fields">
<dt>Decorators:</dt>
<dd><ul class="nomargin-top">
<li><code>@task</code></li>
</ul></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> <a
href="publicmapping-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a href="http://publicmapping.github.com/districtbuilder/">Publicmapping on GitHub</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 Thu Jan 12 09:54:04 2012
</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>