Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4412e23

Browse files
committed
Updated readme for v2
1 parent 0428e67 commit 4412e23

File tree

2 files changed

+80
-6
lines changed

2 files changed

+80
-6
lines changed

README.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ The Python Shapefile Library (pyshp) reads and writes ESRI Shapefiles in pure Py
1010

1111
[Overview](#overview)
1212

13+
[Version Changes](#version-changes)
14+
1315
[Basic Use](#basic-use)
1416
- [Reading Shapefiles](#reading-shapefiles)
1517
- [Reading Shapefiles Using the Context Manager](#reading-shapefiles-using-the-context-manager)
@@ -33,6 +35,7 @@ The Python Shapefile Library (pyshp) reads and writes ESRI Shapefiles in pure Py
3335

3436
[Testing](#testing)
3537

38+
3639
# Overview
3740

3841
The Python Shapefile Library (pyshp) provides read and write support for the
@@ -53,7 +56,7 @@ despite the numerous ways to store and exchange GIS data available today.
5356
Pyshp is compatible with Python 2.7-3.x.
5457

5558
This document provides examples for using pyshp to read and write shapefiles. However
56-
many more examples are continually added to the pyshp wiki on GitHub, the blog [http://GeospatialPython.com](http://GeospatialPython.com),
59+
many more examples are continually added to the blog [http://GeospatialPython.com](http://GeospatialPython.com),
5760
and by searching for pyshp on [https://gis.stackexchange.com](https://gis.stackexchange.com).
5861

5962
Currently the sample census blockgroup shapefile referenced in the examples is available on the GitHub project site at
@@ -69,6 +72,47 @@ reading and writing data, and allows you to focus on the challenging and FUN
6972
part of your geospatial project.
7073

7174

75+
# Version Changes
76+
77+
## 2.0.0
78+
79+
The newest version of PyShp, version 2.x introduced some major new features.
80+
This resulted in some API changes that are incompatible with previous versions.
81+
Users of the previous version 1.x should therefore take note of the following changes
82+
(Note: Some contributor attributions may be missing):
83+
84+
Major Changes:
85+
86+
- Full support for unicode text, with custom encoding, and exception handling.
87+
- Means that the Reader returns unicode, and the Writer accepts unicode.
88+
- PyShp has been simplified to a pure input-output library using the Reader and Writer classes, dropping the Editor class.
89+
- Switched to a new streaming approach when writing files, keeping memory-usage at a minimum:
90+
- Specify filepath/destination and text encoding when creating the Writer.
91+
- The file is written incrementally with each call to shape/record.
92+
- Adding shapes is now done using dedicated methods for each shapetype.
93+
- Reading shapefiles is now more convenient:
94+
- Shapefiles can be opened using the context manager, and files are properly closed.
95+
- Shapefiles can be iterated, have a length, and supports the geo interface.
96+
- New ways of inspecing shapefile metadata by printing. [@megies]
97+
- More convenient accessing of Record values as attributes. [@philippkraft]
98+
- More convenient shape type name checking. [@megies]
99+
- Add more support and documentation for MultiPatch 3D shapes.
100+
- Better documentation of previously unclear aspects, such as field types.
101+
102+
Important Fixes:
103+
104+
- More reliable/robust:
105+
- Fixed shapefile bbox error for empty or point type shapefiles. [@mcuprjak]
106+
- Reading and writing Z and M type shapes is now more robust, fixing many errors, and has been added to the documentation. [@ShinNoNoir]
107+
- Improved parsing of field value types, fixed errors and made more flexible.
108+
- Fixed bug when writing shapefiles with datefield and date values earlier than 1900 [@megies]
109+
- Fix some geo interface errors, including checking polygon directions.
110+
- Bug fixes for reading from case sensitive file names, individual files separately, and from file-like objects. [@gastoneb, @kb003308, @erickskb]
111+
- Enforce maximum field limit. [@mwtoews]
112+
113+
A great thanks to all who have contributed code and raised issues for version 2.x, and for the patience and understanding during the
114+
transition period.
115+
72116

73117
# Basic Use
74118

@@ -393,7 +437,7 @@ Calling the shapeRecords() method will return the geometry and attributes for
393437
all shapes as a list of ShapeRecord objects. Each ShapeRecord instance has a
394438
"shape" and "record" attribute. The shape attribute is a Shape object as
395439
discussed in the first section "Reading Geometry". The record attribute is a
396-
list of field values as demonstrated in the "Reading Records" section.
440+
list-like object containing field values as demonstrated in the "Reading Records" section.
397441

398442

399443
>>> shapeRecs = sf.shapeRecords()

changelog.txt

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
1-
VERSION 2.0.0-dev
2-
3-
... Tobias Megies <[email protected]>
4-
* Fixed bug writing shapefiles with datefield and date values earlier than 1900
51

2+
VERSION 2.0.0
3+
4+
2018-09-01
5+
(Note: Some contributor attributions may be missing.)
6+
New Features:
7+
* Full support for unicode text, with custom encoding, and exception handling.
8+
- Means that the Reader returns unicode, and the Writer accepts unicode.
9+
* PyShp has been simplified to a pure input-output library using the Reader and Writer classes, dropping the Editor class.
10+
* Switched to a new streaming approach when writing files, keeping memory-usage at a minimum:
11+
- Specify filepath/destination and text encoding when creating the Writer.
12+
- The file is written incrementally with each call to shape/record.
13+
- Adding shapes is now done using dedicated methods for each shapetype.
14+
* Reading shapefiles is now more convenient:
15+
- Shapefiles can be opened using the context manager, and files are properly closed.
16+
- Shapefiles can be iterated, have a length, and supports the geo interface.
17+
- New ways of inspecing shapefile metadata by printing. [@megies]
18+
- More convenient accessing of Record values as attributes. [@philippkraft]
19+
- More convenient shape type name checking. [@megies]
20+
* Add more support and documentation for MultiPatch 3D shapes.
21+
* Better documentation of previously unclear aspects, such as field types.
22+
23+
Bug Fixes:
24+
* More reliable/robust:
25+
- Fixed shapefile bbox error for empty or point type shapefiles. [@mcuprjak]
26+
- Reading and writing Z and M type shapes is now more robust, fixing many errors, and has been added to the documentation. [@ShinNoNoir]
27+
- Improved parsing of field value types, fixed errors and made more flexible.
28+
- Fixed bug when writing shapefiles with datefield and date values earlier than 1900 [@megies]
29+
* Fix some geo interface errors, including checking polygon directions.
30+
* Bug fixes for reading from case sensitive file names, individual files separately, and from file-like objects. [@gastoneb, @kb003308, @erickskb]
31+
* Enforce maximum field limit. [@mwtoews]
32+
33+
VERSION 1.2.12
34+
* ?
35+
636
VERSION 1.2.11
737

838
2017-04-29 Karim Bahgat <[email protected]>

0 commit comments

Comments
 (0)