Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fd72895

Browse filesBrowse files
committed
Misc readme cleanups
1 parent aa9b2d3 commit fd72895
Copy full SHA for fd72895

File tree

Expand file treeCollapse file tree

1 file changed

+5
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-10
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+5-10Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ Let's read the blockgroup key and the population for the 4th blockgroup:
465465
['060750601001', 4715]
466466

467467
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\_\_:
469469

470470

471471
>>> shapeRecs.__geo_interface__['type']
@@ -477,7 +477,7 @@ To get the 4th shape record from the blockgroups shapefile use the third index:
477477

478478
>>> shapeRec = sf.shapeRecord(3)
479479

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:
481481

482482

483483
>>> shapeRec.__geo_interface__['type']
@@ -488,11 +488,6 @@ The blockgroup key and population count:
488488

489489
>>> shapeRec.record[1:3]
490490
['060750601001', 4715]
491-
492-
>>> points = shapeRec.shape.points[0:2]
493-
494-
>>> len(points)
495-
2
496491

497492

498493
## Writing Shapefiles
@@ -760,8 +755,8 @@ These are specified as a list of xy point coordinates.
760755

761756
**Adding a LineString shape**
762757

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.
765760

766761

767762
>>> 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
10251020
to load everything into memory, such as a large CSV table or a large shapefile, you can
10261021
process and write any number of items, and even merge many different source files into a single
10271022
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.
10291024

10301025
## Unicode and Shapefile Encodings
10311026

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.