pyshp
pyshp copied to clipboard
This library reads and writes ESRI Shapefiles in pure Python.
Due to recent changes since 1.2.10, the issue of field and value types have been raised as a concern by several users. Most recently, @klasko2 pointed out in #99 that...
### What's your question? when I create the shapefile,such as: w = shapefile.Writer(shapname) w.field("name1", "C") w.linez([data1]) w.record("cross1") w.field("name2", "C") w.linez([data2]) w.record("line1") w.close() Then I read the shapefile: sf = shapefile.Reader(shapname)...
This ensures the dict items from ShapeRecord.Record.as_dict are in the same order as in the shapefile .dbf
### PyShp Version 2.3.1 ### Python Version 3.9.12 ### Your code ```shell #-create file w = shapefile.Writer(outbin+outdir+"/"+outproc) #-define 'w' file's fields ro = shapefile.Reader(infileo) for field in ro.fields[1:]: if field[0]...
When I try to calculate something such as distance between geometries, I will use `shapely` however shapely's geometry is not hashable,so I must use shapely's wkt such as: `dict[key] =...
### What's your question? I want to modify the shape value directly, by using sf.shape(i).points = [[xx,xx]],but it is nothing useful
### Describe the feature request Non-standard but commonly accepted cpg file that specifies which text encoding to use. Would make for more robust handling of files and special cases. Main...
### Describe the feature request Looking for the ability to easily read a geojson file into the Reader. ### Contributions - [ ] I am interested in implementing the described...
As a future addition to the README, we want to add a "Used By" section that lists high-profile or interesting examples of libraries that rely on pyshp. Here's a non-complete...
Added the ability to iterate through shape records and only return records where a lat/lon point is in the polygon. This can be used to pinpoint a block someone is...