This file is indexed.

/usr/share/doc/python-geopandas-doc/user.html is in python-geopandas-doc 0.1.1-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
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
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>GeoPandas User Guide &mdash; GeoPandas 0.1.1 documentation</title>
    
    <link rel="stylesheet" href="_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.1.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="author" title="About these documents" href="about.html" />
    <link rel="top" title="GeoPandas 0.1.1 documentation" href="index.html" />
    <link rel="next" title="About" href="about.html" />
    <link rel="prev" title="Installation" href="install.html" /> 
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="about.html" title="About"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="install.html" title="Installation"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">GeoPandas 0.1.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="geopandas-user-guide">
<h1>GeoPandas User Guide<a class="headerlink" href="#geopandas-user-guide" title="Permalink to this headline"></a></h1>
<p>GeoPandas implements two main data structures, a <code class="docutils literal"><span class="pre">GeoSeries</span></code> and a
<code class="docutils literal"><span class="pre">GeoDataFrame</span></code>.  These are subclasses of pandas <code class="docutils literal"><span class="pre">Series</span></code> and
<code class="docutils literal"><span class="pre">DataFrame</span></code>, respectively.</p>
<div class="section" id="geoseries">
<h2>GeoSeries<a class="headerlink" href="#geoseries" title="Permalink to this headline"></a></h2>
<p>A <code class="docutils literal"><span class="pre">GeoSeries</span></code> contains a sequence of geometries.</p>
<p>The <code class="docutils literal"><span class="pre">GeoSeries</span></code> class implements nearly all of the attributes and
methods of Shapely objects.  When applied to a <code class="docutils literal"><span class="pre">GeoSeries</span></code>, they
will apply elementwise to all geometries in the series.  Binary
operations can be applied between two <code class="docutils literal"><span class="pre">GeoSeries</span></code>, in which case the
operation is carried out elementwise.  The two series will be aligned
by matching indices.  Binary operations can also be applied to a
single geometry, in which case the operation is carried out for each
element of the series with that geometry.  In either case, a
<code class="docutils literal"><span class="pre">Series</span></code> or a <code class="docutils literal"><span class="pre">GeoSeries</span></code> will be returned, as appropriate.</p>
<p>The following Shapely methods and attributes are available on
<code class="docutils literal"><span class="pre">GeoSeries</span></code> objects:</p>
<dl class="attribute">
<dt id="GeoSeries.area">
<code class="descclassname">GeoSeries.</code><code class="descname">area</code><a class="headerlink" href="#GeoSeries.area" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> containing the area of each geometry in the <code class="docutils literal"><span class="pre">GeoSeries</span></code>.</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.bounds">
<code class="descclassname">GeoSeries.</code><code class="descname">bounds</code><a class="headerlink" href="#GeoSeries.bounds" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">DataFrame</span></code> with columns <code class="docutils literal"><span class="pre">minx</span></code>, <code class="docutils literal"><span class="pre">miny</span></code>, <code class="docutils literal"><span class="pre">maxx</span></code>,
<code class="docutils literal"><span class="pre">maxy</span></code> values containing the bounds for each geometry.
(see <code class="docutils literal"><span class="pre">GeoSeries.total_bounds</span></code> for the limits of the entire series).</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.length">
<code class="descclassname">GeoSeries.</code><code class="descname">length</code><a class="headerlink" href="#GeoSeries.length" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> containing the length of each geometry.</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.geom_type">
<code class="descclassname">GeoSeries.</code><code class="descname">geom_type</code><a class="headerlink" href="#GeoSeries.geom_type" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of strings specifying the <cite>Geometry Type</cite> of
each object.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.distance">
<code class="descclassname">GeoSeries.</code><code class="descname">distance</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.distance" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> containing the minimum distance to the <cite>other</cite>
<code class="docutils literal"><span class="pre">GeoSeries</span></code> (elementwise) or geometric object.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.representative_point">
<code class="descclassname">GeoSeries.</code><code class="descname">representative_point</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.representative_point" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of (cheaply computed) points that are
guaranteed to be within each geometry.</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.exterior">
<code class="descclassname">GeoSeries.</code><code class="descname">exterior</code><a class="headerlink" href="#GeoSeries.exterior" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of LinearRings representing the outer
boundary of each polygon in the GeoSeries.  (Applies to GeoSeries
containing only Polygons).</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.interiors">
<code class="descclassname">GeoSeries.</code><code class="descname">interiors</code><a class="headerlink" href="#GeoSeries.interiors" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of InteriorRingSequences representing the
inner rings of each polygon in the GeoSeries.  (Applies to GeoSeries
containing only Polygons).</p>
</dd></dl>

<p><cite>Unary Predicates</cite></p>
<dl class="attribute">
<dt id="GeoSeries.is_empty">
<code class="descclassname">GeoSeries.</code><code class="descname">is_empty</code><a class="headerlink" href="#GeoSeries.is_empty" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> for
empty geometries.</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.is_ring">
<code class="descclassname">GeoSeries.</code><code class="descname">is_ring</code><a class="headerlink" href="#GeoSeries.is_ring" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> for
features that are closed.</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.is_simple">
<code class="descclassname">GeoSeries.</code><code class="descname">is_simple</code><a class="headerlink" href="#GeoSeries.is_simple" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> for
geometries that do not cross themselves (meaningful only for
<cite>LineStrings</cite> and <cite>LinearRings</cite>).</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.is_valid">
<code class="descclassname">GeoSeries.</code><code class="descname">is_valid</code><a class="headerlink" href="#GeoSeries.is_valid" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> for
geometries that are valid.</p>
</dd></dl>

<p><cite>Binary Predicates</cite></p>
<dl class="method">
<dt id="GeoSeries.almost_equals">
<code class="descclassname">GeoSeries.</code><code class="descname">almost_equals</code><span class="sig-paren">(</span><em>other</em><span class="optional">[</span>, <em>decimal=6</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.almost_equals" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> if
each object is approximately equal to the <cite>other</cite> at all
points to specified <cite>decimal</cite> place precision.  (See also <a class="reference internal" href="#GeoSeries.equals" title="GeoSeries.equals"><code class="xref py py-meth docutils literal"><span class="pre">equals()</span></code></a>)</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.contains">
<code class="descclassname">GeoSeries.</code><code class="descname">contains</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.contains" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> if
each object&#8217;s <cite>interior</cite> contains the <cite>boundary</cite> and
<cite>interior</cite> of the other object and their boundaries do not touch at all.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.crosses">
<code class="descclassname">GeoSeries.</code><code class="descname">crosses</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.crosses" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> if
the <cite>interior</cite> of each object intersects the <cite>interior</cite> of
the other but does not contain it, and the dimension of the intersection is
less than the dimension of the one or the other.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.disjoint">
<code class="descclassname">GeoSeries.</code><code class="descname">disjoint</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.disjoint" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> if
the <cite>boundary</cite> and <cite>interior</cite> of each object does not
intersect at all with those of the other.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.equals">
<code class="descclassname">GeoSeries.</code><code class="descname">equals</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.equals" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> if
if the set-theoretic <cite>boundary</cite>, <cite>interior</cite>, and <cite>exterior</cite>
of each object coincides with those of the other.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.intersects">
<code class="descclassname">GeoSeries.</code><code class="descname">intersects</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.intersects" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> if
if the <cite>boundary</cite> and <cite>interior</cite> of each object intersects in
any way with those of the other.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.touches">
<code class="descclassname">GeoSeries.</code><code class="descname">touches</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.touches" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> if
the objects have at least one point in common and their
interiors do not intersect with any part of the other.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.within">
<code class="descclassname">GeoSeries.</code><code class="descname">within</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.within" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">Series</span></code> of <code class="docutils literal"><span class="pre">dtype('bool')</span></code> with value <code class="docutils literal"><span class="pre">True</span></code> if
each object&#8217;s <cite>boundary</cite> and <cite>interior</cite> intersect only
with the <cite>interior</cite> of the other (not its <cite>boundary</cite> or <cite>exterior</cite>).
(Inverse of <a class="reference internal" href="#GeoSeries.contains" title="GeoSeries.contains"><code class="xref py py-meth docutils literal"><span class="pre">contains()</span></code></a>)</p>
</dd></dl>

<p><cite>Set-theoretic Methods</cite></p>
<dl class="attribute">
<dt id="GeoSeries.boundary">
<code class="descclassname">GeoSeries.</code><code class="descname">boundary</code><a class="headerlink" href="#GeoSeries.boundary" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of lower dimensional objects representing
each geometries&#8217;s set-theoretic <cite>boundary</cite>.</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.centroid">
<code class="descclassname">GeoSeries.</code><code class="descname">centroid</code><a class="headerlink" href="#GeoSeries.centroid" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of points for each geometric centroid.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.difference">
<code class="descclassname">GeoSeries.</code><code class="descname">difference</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.difference" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of the points in each geometry that
are not in the <em>other</em> object.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.intersection">
<code class="descclassname">GeoSeries.</code><code class="descname">intersection</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.intersection" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of the intersection of each object with the <cite>other</cite>
geometric object.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.symmetric_difference">
<code class="descclassname">GeoSeries.</code><code class="descname">symmetric_difference</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.symmetric_difference" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of the points in each object not in the <cite>other</cite>
geometric object, and the points in the <cite>other</cite> not in this object.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.union">
<code class="descclassname">GeoSeries.</code><code class="descname">union</code><span class="sig-paren">(</span><em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.union" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of the union of points from each object and the
<cite>other</cite> geometric object.</p>
</dd></dl>

<p><cite>Constructive Methods</cite></p>
<dl class="method">
<dt id="GeoSeries.buffer">
<code class="descclassname">GeoSeries.</code><code class="descname">buffer</code><span class="sig-paren">(</span><em>distance</em>, <em>resolution=16</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.buffer" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of geometries representing all points within a given <cite>distance</cite>
of each geometric object.</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.convex_hull">
<code class="descclassname">GeoSeries.</code><code class="descname">convex_hull</code><a class="headerlink" href="#GeoSeries.convex_hull" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of geometries representing the smallest
convex <cite>Polygon</cite> containing all the points in each object unless the
number of points in the object is less than three. For two points,
the convex hull collapses to a <cite>LineString</cite>; for 1, a <cite>Point</cite>.</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.envelope">
<code class="descclassname">GeoSeries.</code><code class="descname">envelope</code><a class="headerlink" href="#GeoSeries.envelope" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> of geometries representing the point or
smallest rectangular polygon (with sides parallel to the coordinate
axes) that contains each object.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.simplify">
<code class="descclassname">GeoSeries.</code><code class="descname">simplify</code><span class="sig-paren">(</span><em>tolerance</em>, <em>preserve_topology=True</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.simplify" title="Permalink to this definition"></a></dt>
<dd><p>Returns a <code class="docutils literal"><span class="pre">GeoSeries</span></code> containing a simplified representation of
each object.</p>
</dd></dl>

<p><cite>Affine transformations</cite></p>
<dl class="method">
<dt id="GeoSeries.rotate">
<code class="descclassname">GeoSeries.</code><code class="descname">rotate</code><span class="sig-paren">(</span><em>self</em>, <em>angle</em>, <em>origin='center'</em>, <em>use_radians=False</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.rotate" title="Permalink to this definition"></a></dt>
<dd><p>Rotate the coordinates of the GeoSeries.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.scale">
<code class="descclassname">GeoSeries.</code><code class="descname">scale</code><span class="sig-paren">(</span><em>self</em>, <em>xfact=1.0</em>, <em>yfact=1.0</em>, <em>zfact=1.0</em>, <em>origin='center'</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.scale" title="Permalink to this definition"></a></dt>
<dd><p>Scale the geometries of the GeoSeries along each (x, y, z) dimensio.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.skew">
<code class="descclassname">GeoSeries.</code><code class="descname">skew</code><span class="sig-paren">(</span><em>self</em>, <em>angle</em>, <em>origin='center'</em>, <em>use_radians=False</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.skew" title="Permalink to this definition"></a></dt>
<dd><p>Shear/Skew the geometries of the GeoSeries by angles along x and y dimensions.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.translate">
<code class="descclassname">GeoSeries.</code><code class="descname">translate</code><span class="sig-paren">(</span><em>self</em>, <em>angle</em>, <em>origin='center'</em>, <em>use_radians=False</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.translate" title="Permalink to this definition"></a></dt>
<dd><p>Shift the coordinates of the GeoSeries.</p>
</dd></dl>

<p><cite>Aggregating methods</cite></p>
<dl class="attribute">
<dt id="GeoSeries.unary_union">
<code class="descclassname">GeoSeries.</code><code class="descname">unary_union</code><a class="headerlink" href="#GeoSeries.unary_union" title="Permalink to this definition"></a></dt>
<dd><p>Return a geometry containing the union of all geometries in the <code class="docutils literal"><span class="pre">GeoSeries</span></code>.</p>
</dd></dl>

<p>Additionally, the following methods are implemented:</p>
<dl class="method">
<dt id="GeoSeries.from_file">
<code class="descclassname">GeoSeries.</code><code class="descname">from_file</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.from_file" title="Permalink to this definition"></a></dt>
<dd><p>Load a <code class="docutils literal"><span class="pre">GeoSeries</span></code> from a file from any format recognized by
<a class="reference external" href="http://toblerity.github.io/fiona">fiona</a>.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.to_crs">
<code class="descclassname">GeoSeries.</code><code class="descname">to_crs</code><span class="sig-paren">(</span><em>crs=None</em>, <em>epsg=None</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.to_crs" title="Permalink to this definition"></a></dt>
<dd><p>Transform all geometries in a GeoSeries to a different coordinate
reference system.  The <code class="docutils literal"><span class="pre">crs</span></code> attribute on the current GeoSeries
must be set.  Either <code class="docutils literal"><span class="pre">crs</span></code> in dictionary form or an EPSG code may
be specified for output.</p>
<p>This method will transform all points in all objects.  It has no
notion or projecting entire geometries.  All segments joining points
are assumed to be lines in the current projection, not geodesics.
Objects crossing the dateline (or other projection boundary) will
have undesirable behavior.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.plot">
<code class="descclassname">GeoSeries.</code><code class="descname">plot</code><span class="sig-paren">(</span><em>colormap='Set1'</em>, <em>alpha=0.5</em>, <em>axes=None</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.plot" title="Permalink to this definition"></a></dt>
<dd><p>Generate a plot of the geometries in the <code class="docutils literal"><span class="pre">GeoSeries</span></code>.
<code class="docutils literal"><span class="pre">colormap</span></code> can be any recognized by matplotlib, but discrete
colormaps such as <code class="docutils literal"><span class="pre">Accent</span></code>, <code class="docutils literal"><span class="pre">Dark2</span></code>, <code class="docutils literal"><span class="pre">Paired</span></code>, <code class="docutils literal"><span class="pre">Pastel1</span></code>,
<code class="docutils literal"><span class="pre">Pastel2</span></code>, <code class="docutils literal"><span class="pre">Set1</span></code>, <code class="docutils literal"><span class="pre">Set2</span></code>, or <code class="docutils literal"><span class="pre">Set3</span></code> are recommended.
Wraps the <code class="docutils literal"><span class="pre">plot_series()</span></code> function.</p>
</dd></dl>

<dl class="attribute">
<dt id="GeoSeries.total_bounds">
<code class="descclassname">GeoSeries.</code><code class="descname">total_bounds</code><a class="headerlink" href="#GeoSeries.total_bounds" title="Permalink to this definition"></a></dt>
<dd><p>Returns a tuple containing <code class="docutils literal"><span class="pre">minx</span></code>, <code class="docutils literal"><span class="pre">miny</span></code>, <code class="docutils literal"><span class="pre">maxx</span></code>,
<code class="docutils literal"><span class="pre">maxy</span></code> values for the bounds of the series as a whole.
See <code class="docutils literal"><span class="pre">GeoSeries.bounds</span></code> for the bounds of the geometries contained
in the series.</p>
</dd></dl>

<p>Methods of pandas <code class="docutils literal"><span class="pre">Series</span></code> objects are also available, although not
all are applicable to geometric objects and some may return a
<code class="docutils literal"><span class="pre">Series</span></code> rather than a <code class="docutils literal"><span class="pre">GeoSeries</span></code> result.  The methods
<code class="docutils literal"><span class="pre">copy()</span></code>, <code class="docutils literal"><span class="pre">align()</span></code>, <code class="docutils literal"><span class="pre">isnull()</span></code> and <code class="docutils literal"><span class="pre">fillna()</span></code> have been
implemented specifically for <code class="docutils literal"><span class="pre">GeoSeries</span></code> and are expected to work
correctly.</p>
</div>
<div class="section" id="geodataframe">
<h2>GeoDataFrame<a class="headerlink" href="#geodataframe" title="Permalink to this headline"></a></h2>
<p>A <code class="docutils literal"><span class="pre">GeoDataFrame</span></code> is a tablular data structure that contains a column
called <code class="docutils literal"><span class="pre">geometry</span></code> which contains a <cite>GeoSeries`</cite>.</p>
<p>Currently, the following methods are implemented for a <code class="docutils literal"><span class="pre">GeoDataFrame</span></code>:</p>
<dl class="classmethod">
<dt id="GeoDataFrame.from_file">
<em class="property">classmethod </em><code class="descclassname">GeoDataFrame.</code><code class="descname">from_file</code><span class="sig-paren">(</span><em>filename</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoDataFrame.from_file" title="Permalink to this definition"></a></dt>
<dd><p>Load a <code class="docutils literal"><span class="pre">GeoDataFrame</span></code> from a file from any format recognized by
<a class="reference external" href="http://toblerity.github.io/fiona">fiona</a>.  See <code class="docutils literal"><span class="pre">read_file()</span></code>.</p>
</dd></dl>

<dl class="classmethod">
<dt id="GeoDataFrame.from_postgis">
<em class="property">classmethod </em><code class="descclassname">GeoDataFrame.</code><code class="descname">from_postgis</code><span class="sig-paren">(</span><em>sql</em>, <em>con</em>, <em>geom_col='geom'</em>, <em>crs=None</em>, <em>index_col=None</em>, <em>coerce_float=True</em>, <em>params=None</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoDataFrame.from_postgis" title="Permalink to this definition"></a></dt>
<dd><p>Load a <code class="docutils literal"><span class="pre">GeoDataFrame</span></code> from a file from a PostGIS database.
See <code class="docutils literal"><span class="pre">read_postgis()</span></code>.</p>
</dd></dl>

<dl class="method">
<dt>
<code class="descclassname">GeoSeries.</code><code class="descname">to_crs</code><span class="sig-paren">(</span><em>crs=None</em>, <em>epsg=None</em>, <em>inplace=False</em><span class="sig-paren">)</span></dt>
<dd><p>Transform all geometries in the <code class="docutils literal"><span class="pre">geometry</span></code> column of a
GeoDataFrame to a different coordinate reference system.  The
<code class="docutils literal"><span class="pre">crs</span></code> attribute on the current GeoSeries must be set.  Either
<code class="docutils literal"><span class="pre">crs</span></code> in dictionary form or an EPSG code may be specified for
output.  If <code class="docutils literal"><span class="pre">inplace=True</span></code> the geometry column will be replaced in
the current dataframe, otherwise a new GeoDataFrame will be returned.</p>
<p>This method will transform all points in all objects.  It has no
notion or projecting entire geometries.  All segments joining points
are assumed to be lines in the current projection, not geodesics.
Objects crossing the dateline (or other projection boundary) will
have undesirable behavior.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.to_file">
<code class="descclassname">GeoSeries.</code><code class="descname">to_file</code><span class="sig-paren">(</span><em>filename</em>, <em>driver=&quot;ESRI Shapefile&quot;</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.to_file" title="Permalink to this definition"></a></dt>
<dd><p>Write the <code class="docutils literal"><span class="pre">GeoDataFrame</span></code> to a file.  By default, an ESRI shapefile
is written, but any OGR data source supported by Fiona can be
written.  <code class="docutils literal"><span class="pre">**kwargs</span></code> are passed to the Fiona driver.</p>
</dd></dl>

<dl class="method">
<dt id="GeoSeries.to_json">
<code class="descclassname">GeoSeries.</code><code class="descname">to_json</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoSeries.to_json" title="Permalink to this definition"></a></dt>
<dd><p>Returns a GeoJSON representation of the <code class="docutils literal"><span class="pre">GeoDataFrame</span></code> as a string.</p>
</dd></dl>

<dl class="method">
<dt id="GeoDataFrame.plot">
<code class="descclassname">GeoDataFrame.</code><code class="descname">plot</code><span class="sig-paren">(</span><em>column=None</em>, <em>colormap=None</em>, <em>alpha=0.5</em>, <em>categorical=False</em>, <em>legend=False</em>, <em>axes=None</em><span class="sig-paren">)</span><a class="headerlink" href="#GeoDataFrame.plot" title="Permalink to this definition"></a></dt>
<dd><p>Generate a plot of the geometries in the <code class="docutils literal"><span class="pre">GeoDataFrame</span></code>.  If the
<code class="docutils literal"><span class="pre">column</span></code> parameter is given, colors plot according to values in
that column, otherwise calls <code class="docutils literal"><span class="pre">GeoSeries.plot()</span></code> on the
<code class="docutils literal"><span class="pre">geometry</span></code> column.  Wraps the <code class="docutils literal"><span class="pre">plot_dataframe()</span></code> function.</p>
</dd></dl>

<p>All pandas <code class="docutils literal"><span class="pre">DataFrame</span></code> methods are also available, although they may
not operate in a meaningful way on the <code class="docutils literal"><span class="pre">geometry</span></code> column and may not
return a <code class="docutils literal"><span class="pre">GeoDataFrame</span></code> result even when it would be appropriate to
do so.</p>
</div>
<div class="section" id="geopandas-functions">
<h2>Geopandas functions<a class="headerlink" href="#geopandas-functions" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="geopandas.geocode.geocode">
<code class="descclassname">geopandas.geocode.</code><code class="descname">geocode</code><span class="sig-paren">(</span><em>strings</em>, <em>provider='googlev3'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#geopandas.geocode.geocode" title="Permalink to this definition"></a></dt>
<dd><p>Geocode a list of strings and return a GeoDataFrame containing the
resulting points in its <code class="docutils literal"><span class="pre">geometry</span></code> column.  Available
<code class="docutils literal"><span class="pre">provider``s</span> <span class="pre">include</span> <span class="pre">``googlev3</span></code>, <code class="docutils literal"><span class="pre">bing</span></code>, <code class="docutils literal"><span class="pre">google</span></code>, <code class="docutils literal"><span class="pre">yahoo</span></code>,
<code class="docutils literal"><span class="pre">mapquest</span></code>, and <code class="docutils literal"><span class="pre">openmapquest</span></code>.  <code class="docutils literal"><span class="pre">**kwargs</span></code> will be passed as
parameters to the appropriate geocoder.</p>
<p>Requires <a class="reference external" href="https://github.com/geopy/geopy">geopy</a>.  Please consult the Terms of Service for the
chosen provider.</p>
</dd></dl>

</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">p1</span> <span class="o">=</span> <span class="n">Polygon</span><span class="p">([(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p2</span> <span class="o">=</span> <span class="n">Polygon</span><span class="p">([(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">p3</span> <span class="o">=</span> <span class="n">Polygon</span><span class="p">([(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">)])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">g</span> <span class="o">=</span> <span class="n">GeoSeries</span><span class="p">([</span><span class="n">p1</span><span class="p">,</span> <span class="n">p2</span><span class="p">,</span> <span class="n">p3</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">g</span>
<span class="go">0    POLYGON ((0.0000000000000000 0.000000000000000...</span>
<span class="go">1    POLYGON ((0.0000000000000000 0.000000000000000...</span>
<span class="go">2    POLYGON ((2.0000000000000000 0.000000000000000...</span>
<span class="go">dtype: object</span>
</pre></div>
</div>
<img alt="_images/test.png" src="_images/test.png" />
<p>Some geographic operations return normal pandas object.  The <code class="docutils literal"><span class="pre">area</span></code> property of a <code class="docutils literal"><span class="pre">GeoSeries</span></code> will return a <code class="docutils literal"><span class="pre">pandas.Series</span></code> containing the area of each item in the <code class="docutils literal"><span class="pre">GeoSeries</span></code>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">g</span><span class="o">.</span><span class="n">area</span>
<span class="go">0    0.5</span>
<span class="go">1    1.0</span>
<span class="go">2    1.0</span>
<span class="go">dtype: float64</span>
</pre></div>
</div>
<p>Other operations return GeoPandas objects:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">g</span><span class="o">.</span><span class="n">buffer</span><span class="p">(</span><span class="mf">0.5</span><span class="p">)</span>
<span class="go">Out[15]:</span>
<span class="go">0    POLYGON ((-0.3535533905932737 0.35355339059327...</span>
<span class="go">1    POLYGON ((-0.5000000000000000 0.00000000000000...</span>
<span class="go">2    POLYGON ((1.5000000000000000 0.000000000000000...</span>
<span class="go">dtype: object</span>
</pre></div>
</div>
<img alt="_images/test_buffer.png" src="_images/test_buffer.png" />
<p>GeoPandas objects also know how to plot themselves.  GeoPandas uses <a class="reference external" href="https://pypi.python.org/pypi/descartes">descartes</a> to generate a <a class="reference external" href="http://matplotlib.org">matplotlib</a> plot. To generate a plot of our GeoSeries, use:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">g</span><span class="o">.</span><span class="n">plot</span><span class="p">()</span>
</pre></div>
</div>
<p>GeoPandas also implements alternate constructors that can read any data format recognized by <a class="reference external" href="http://toblerity.github.io/fiona">fiona</a>.  To read a <a class="reference external" href="http://www.nyc.gov/html/dcp/download/bytes/nybb_14aav.zip">file containing the boroughs of New York City</a>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">boros</span> <span class="o">=</span> <span class="n">GeoDataFrame</span><span class="o">.</span><span class="n">from_file</span><span class="p">(</span><span class="s1">&#39;nybb.shp&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">boros</span><span class="o">.</span><span class="n">set_index</span><span class="p">(</span><span class="s1">&#39;BoroCode&#39;</span><span class="p">,</span> <span class="n">inplace</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">boros</span><span class="o">.</span><span class="n">sort</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">boros</span>
<span class="go">               BoroName    Shape_Area     Shape_Leng  \</span>
<span class="go">BoroCode</span>
<span class="go">1             Manhattan  6.364422e+08  358532.956418</span>
<span class="go">2                 Bronx  1.186804e+09  464517.890553</span>
<span class="go">3              Brooklyn  1.959432e+09  726568.946340</span>
<span class="go">4                Queens  3.049947e+09  861038.479299</span>
<span class="go">5         Staten Island  1.623853e+09  330385.036974</span>

<span class="go">                                                   geometry</span>
<span class="go">BoroCode</span>
<span class="go">1         (POLYGON ((981219.0557861328125000 188655.3157...</span>
<span class="go">2         (POLYGON ((1012821.8057861328125000 229228.264...</span>
<span class="go">3         (POLYGON ((1021176.4790039062500000 151374.796...</span>
<span class="go">4         (POLYGON ((1029606.0765991210937500 156073.814...</span>
<span class="go">5         (POLYGON ((970217.0223999023437500 145643.3322...</span>
</pre></div>
</div>
<img alt="_images/nyc.png" src="_images/nyc.png" />
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">boros</span><span class="p">[</span><span class="s1">&#39;geometry&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">convex_hull</span>
<span class="go">0    POLYGON ((915517.6877458114176989 120121.88125...</span>
<span class="go">1    POLYGON ((1000721.5317993164062500 136681.7761...</span>
<span class="go">2    POLYGON ((988872.8212280273437500 146772.03179...</span>
<span class="go">3    POLYGON ((977855.4451904296875000 188082.32238...</span>
<span class="go">4    POLYGON ((1017949.9776000976562500 225426.8845...</span>
<span class="go">dtype: object</span>
</pre></div>
</div>
<img alt="_images/nyc_hull.png" src="_images/nyc_hull.png" />
<p>To demonstrate a more complex operation, we&#8217;ll generate a
<code class="docutils literal"><span class="pre">GeoSeries</span></code> containing 2000 random points:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">shapely.geometry</span> <span class="kn">import</span> <span class="n">Point</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">xmin</span><span class="p">,</span> <span class="n">xmax</span><span class="p">,</span> <span class="n">ymin</span><span class="p">,</span> <span class="n">ymax</span> <span class="o">=</span> <span class="mi">900000</span><span class="p">,</span> <span class="mi">1080000</span><span class="p">,</span> <span class="mi">120000</span><span class="p">,</span> <span class="mi">280000</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">xc</span> <span class="o">=</span> <span class="p">(</span><span class="n">xmax</span> <span class="o">-</span> <span class="n">xmin</span><span class="p">)</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">random</span><span class="p">(</span><span class="mi">2000</span><span class="p">)</span> <span class="o">+</span> <span class="n">xmin</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">yc</span> <span class="o">=</span> <span class="p">(</span><span class="n">ymax</span> <span class="o">-</span> <span class="n">ymin</span><span class="p">)</span> <span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">random</span><span class="p">(</span><span class="mi">2000</span><span class="p">)</span> <span class="o">+</span> <span class="n">ymin</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pts</span> <span class="o">=</span> <span class="n">GeoSeries</span><span class="p">([</span><span class="n">Point</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span> <span class="k">for</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">xc</span><span class="p">,</span> <span class="n">yc</span><span class="p">)])</span>
</pre></div>
</div>
<p>Now draw a circle with fixed radius around each point:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">circles</span> <span class="o">=</span> <span class="n">pts</span><span class="o">.</span><span class="n">buffer</span><span class="p">(</span><span class="mi">2000</span><span class="p">)</span>
</pre></div>
</div>
<p>We can collapse these circles into a single shapely MultiPolygon
geometry with</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mp</span> <span class="o">=</span> <span class="n">circles</span><span class="o">.</span><span class="n">unary_union</span>
</pre></div>
</div>
<p>To extract the part of this geometry contained in each borough, we can
just use:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">holes</span> <span class="o">=</span> <span class="n">boros</span><span class="p">[</span><span class="s1">&#39;geometry&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">intersection</span><span class="p">(</span><span class="n">mp</span><span class="p">)</span>
</pre></div>
</div>
<img alt="_images/holes.png" src="_images/holes.png" />
<p>and to get the area outside of the holes:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">boros_with_holes</span> <span class="o">=</span> <span class="n">boros</span><span class="p">[</span><span class="s1">&#39;geometry&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">difference</span><span class="p">(</span><span class="n">mp</span><span class="p">)</span>
</pre></div>
</div>
<img alt="_images/boros_with_holes.png" src="_images/boros_with_holes.png" />
<p>Note that this can be simplified a bit, since <code class="docutils literal"><span class="pre">geometry</span></code> is
available as an attribute on a <code class="docutils literal"><span class="pre">GeoDataFrame</span></code>, and the
<code class="docutils literal"><span class="pre">intersection</span></code> and <code class="docutils literal"><span class="pre">difference</span></code> methods are implemented with the
&#8220;&amp;&#8221; and &#8220;-&#8221; operators, respectively.  For example, the latter could
have been expressed simply as <code class="docutils literal"><span class="pre">boros.geometry</span> <span class="pre">-</span> <span class="pre">mp</span></code>.</p>
<p>It&#8217;s easy to do things like calculate the fractional area in each
borough that are in the holes:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">holes</span><span class="o">.</span><span class="n">area</span> <span class="o">/</span> <span class="n">boros</span><span class="o">.</span><span class="n">geometry</span><span class="o">.</span><span class="n">area</span>
<span class="go">BoroCode</span>
<span class="go">1           0.602015</span>
<span class="go">2           0.523457</span>
<span class="go">3           0.585901</span>
<span class="go">4           0.577020</span>
<span class="go">5           0.559507</span>
<span class="go">dtype: float64</span>
</pre></div>
</div>
<div class="toctree-wrapper compound">
<ul class="simple">
</ul>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">GeoPandas User Guide</a><ul>
<li><a class="reference internal" href="#geoseries">GeoSeries</a></li>
<li><a class="reference internal" href="#geodataframe">GeoDataFrame</a></li>
<li><a class="reference internal" href="#geopandas-functions">Geopandas functions</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="install.html"
                        title="previous chapter">Installation</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="about.html"
                        title="next chapter">About</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/user.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="about.html" title="About"
             >next</a> |</li>
        <li class="right" >
          <a href="install.html" title="Installation"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">GeoPandas 0.1.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &copy; Copyright 2013-2014, GeoPandas developers.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.5.
    </div>
  </body>
</html>