Closed DeoLeung closed 6 years ago
You're right, the shapefile spec says the record numbers begin at 1. This happened because the number was incremented after the number was written. Easy fix by incrementing the number right before, this way the first shape gets index nr 1. See 43582ad58171093a09795858e0700eff84785741.
https://github.com/GeospatialPython/pyshp/blob/master/shapefile.py#L1067
when writing to
shp
file, theshpNum
starts from 0 may cause index problem for some program, likemapnik
.Maybe the
shpNum
start index could be configurable or it should start from 1