Skip to content

Commit 6705f54

Browse files
authored
Fix doctest failure
1 parent cb7f124 commit 6705f54

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ The blockgroup key and population count:
305305

306306
There is also an iterShapeRecords() method to iterate through large files:
307307

308+
308309
>>> shapeRecs = sf.iterShapeRecords()
309310
>>> for shapeRec in shapeRecs:
310311
... # do something here
@@ -373,9 +374,13 @@ number of records equals the number of shapes to create a valid shapefile. You
373374
must take care to add records and shapes in the same order so that the record
374375
data lines up with the geometry data. For example:
375376

376-
>>> for feature in some_thing:
377-
>>> w.record(**feature['properties'])
378-
>>> w.poly(parts=feature['parts']
377+
378+
>>> w.field("field1", "C")
379+
>>> w.field("field2", "C")
380+
>>> w.record("row", "one")
381+
>>> w.record("row", "two")
382+
>>> w.point(1, 1)
383+
>>> w.point(2, 2)
379384

380385
### Adding Geometry
381386

@@ -604,6 +609,7 @@ ithub.com/sgillies/2217756](https://gist.github.com/sgillies/2217756). More
604609
information on GeoJSON is available at
605610
[http://geojson.org](http://geojson.org).
606611

612+
607613
>>> s = sf.shape(0)
608614
>>> s.__geo_interface__["type"]
609615
'MultiPolygon'

0 commit comments

Comments
 (0)