@@ -465,7 +465,7 @@ Let's read the blockgroup key and the population for the 4th blockgroup:
465
465
['060750601001', 4715]
466
466
467
467
The results from the shapeRecords() method is a list-like object that can be easily converted
468
- to GeoJSON through the __ geo_interface __ :
468
+ to GeoJSON through the _ \_ geo_interface \_\_ :
469
469
470
470
471
471
>>> shapeRecs.__geo_interface__['type']
@@ -477,7 +477,7 @@ To get the 4th shape record from the blockgroups shapefile use the third index:
477
477
478
478
>>> shapeRec = sf.shapeRecord(3)
479
479
480
- Each individual shape record also supports the __ geo_interface __ to convert it to a GeoJSON:
480
+ Each individual shape record also supports the _ \_ geo_interface \_\_ to convert it to a GeoJSON:
481
481
482
482
483
483
>>> shapeRec.__geo_interface__['type']
@@ -488,11 +488,6 @@ The blockgroup key and population count:
488
488
489
489
>>> shapeRec.record[1:3]
490
490
['060750601001', 4715]
491
-
492
- >>> points = shapeRec.shape.points[0:2]
493
-
494
- >>> len(points)
495
- 2
496
491
497
492
498
493
## Writing Shapefiles
@@ -760,8 +755,8 @@ These are specified as a list of xy point coordinates.
760
755
761
756
** Adding a LineString shape**
762
757
763
- For LineString shapefiles, each line shape consists of multiple lines. Line shapes must be given as a list of lines,
764
- even if there is just one line. Also, each line must have at least two points.
758
+ For LineString shapefiles, each shape is given as a list of one or more linear features.
759
+ Each of the linear features must have at least two points.
765
760
766
761
767
762
>>> w = shapefile.Writer('shapefiles/test/line')
@@ -1025,7 +1020,7 @@ This means that as long as you are able to iterate through a source file without
1025
1020
to load everything into memory, such as a large CSV table or a large shapefile, you can
1026
1021
process and write any number of items, and even merge many different source files into a single
1027
1022
large shapefile. If you need to edit or undo any of your writing you would have to read the
1028
- file back in one record at a time, make your changes, and write it back out.
1023
+ file back in, one record at a time, make your changes, and write it back out.
1029
1024
1030
1025
## Unicode and Shapefile Encodings
1031
1026
0 commit comments