Skip to content

Commit 6b63fea

Browse files
authored
Merge pull request #387 from GeospatialPython/Test_Polylinez_no_m
Test polygonz files, with no z and no m
2 parents e40495e + 4c6787a commit 6b63fea

5 files changed

Lines changed: 38 additions & 2 deletions

File tree

README.md

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

99
- **Author**: [Joel Lawhead](https://github.com/GeospatialPython)
1010
- **Maintainers**: [Karim Bahgat](https://github.com/karimbahgat)
11-
- **Version**: 3.0.3.dev0
12-
- **Date**: 10th October, 2025
11+
- **Version**: 3.0.5
12+
- **Date**: 18th May 2026
1313
- **License**: [MIT](https://github.com/GeospatialPython/pyshp/blob/master/LICENSE.TXT)
1414

1515
## Contents
@@ -93,6 +93,12 @@ part of your geospatial project.
9393

9494
# Version Changes
9595

96+
## LATEST
97+
98+
### Testing:
99+
- Add shapefile from Open Natual Hazard Modelling ([Paula Spannring](https://github.com/PaulaSp3)
100+
and [Felix Oesterle, Austrian Research Centre for Forests](https://orcid.org/0000-0002-7772-6884)).
101+
96102
## 3.0.5
97103

98104
### Project structure:
@@ -1594,6 +1600,7 @@ davidh-ssec
15941600
Edward Kawas
15951601
Evan Heidtmann
15961602
ezcitron
1603+
Felix Oesterle
15971604
fiveham
15981605
geospatialpython
15991606
Hannes
@@ -1616,6 +1623,7 @@ Mike Toews
16161623
Miroslav Šedivý
16171624
Nilo
16181625
pakoun
1626+
Paula Spannring
16191627
Paulo Ernesto
16201628
Raynor Vliegendhart
16211629
Razzi Abuissa

changelog.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
LATEST
2+
3+
2026-05-18
4+
Testing:
5+
* Add shapefile from Open Natual Hazard Modelling ([Paula Spannring](https://github.com/PaulaSp3)
6+
and [Felix Oesterle, Austrian Research Centre for Forests](https://orcid.org/0000-0002-7772-6884)).
7+
18
VERSION 3.0.5
29

310
2026-05-18

shapefiles/test/ATTRIBUTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
REL.zip - used with kind permission, under license from [Open Natural Hazard Modelling](https://github.com/OpenNHM/AvaFrameData/blob/main/LICENSE) (CC-BY-4.0 on 18th May 2026). A Github organization of the Austrian Research Centre for Forests?

shapefiles/test/REL.zip

1.74 KB
Binary file not shown.

test_shapefile.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,26 @@ def test_shaperecord_record():
14751475
assert record[1:3] == ["060750601001", 4715]
14761476

14771477

1478+
def test_reader_zip_polyylinez_no_m_itershaperecords():
1479+
"""
1480+
Make sure the M field is initialised to None (so the
1481+
fix from the bgu in 3.0.2 isn't regressed)!
1482+
1483+
Test Polygonz Shapes can be read, even if the m field is missing
1484+
(all the points in this file are 2D only, so this could also be
1485+
saved as a Polygon / type 5 shapefile instead of the shape type
1486+
15 one it currently is).
1487+
1488+
REL.zip included with permission: https://github.com/OpenNHM/AvaFrame/issues/1203#issuecomment-4477589128
1489+
Owner: Open Natural Hazard Modelling
1490+
Original source: https://github.com/OpenNHM/AvaFrameData/blob/main/avaPopeletzbach/
1491+
License CC-BY-4.0
1492+
"""
1493+
with shapefile.Reader("shapefiles/test/REL.zip") as sf:
1494+
for _shaperec in sf.iterShapeRecords():
1495+
pass
1496+
1497+
14781498
def test_write_field_name_limit(tmpdir):
14791499
"""
14801500
Abc...

0 commit comments

Comments
 (0)