Pyshp is a pure Python shapefile library which can be used to read, write and edit ESRI shapefiles.

learn more… | top users | synonyms

1
vote
3answers
368 views

Python: How to create a Polygon Shapefile from a list of X,Y coordinates?

I have a list of X,Y coordinates from a csv file, that represent a polygon. I´m trying to create a Polygon-Shapefile from this list. I´ve been trying around and found a possbility to write the list to ...
0
votes
1answer
56 views

Pyshp Editor error

Following my predecessors (here and here) I am trying to append new data to shapefile using Pyshp. The specifics of my problem is the need to save the file with the same name (without creating a new ...
1
vote
2answers
115 views

Extract a record by name in pyshp?

I would like to extract a named subset of the text records from a shapefile using Python/pyshp. Is there a clean/efficient way to do this? Ideally I'd like to use dictionary-like access such as: ...
1
vote
1answer
92 views

PyShp 1.2 creating Polyline from GML

I have a problem in creating some polylines in one Shapefile with PyShape. The plan is to read a GML file containing LineStrings and create a shapefile. The theory is clear, but the realworld is ...
0
votes
1answer
101 views

Appending using PyShp

I am looking to do a simple append using Pyshp and keep running into walls. The editor object could not read the dbf header for the input shapefile so I tried using reader and writer as suggested but ...
1
vote
0answers
163 views

Pyshp 1.2 example from documentation fails

I must be doing something really stupid because I am trying to run an example straight from the PyShp (shapefile.py) 1.2 documentation with the only change being the input shapefile and it is failing. ...
0
votes
0answers
48 views

Pyshp + Mapserver: How to add label at specified coordinate?

EDIT: solved, went for the solution as described below I have a set of polygons defined in a xml file. I create a shapefile with Pyshp. This works fine. But now i want to add labels to the ...
0
votes
3answers
1k views

Using the python shape library: pyshp - how to convert polygons in .csv file to .shp

I'm converting csv data to shapefiles using the pyshp python library. What I want to do is very similar to Using the python shape library: pyshp - how to convert .csv file to .shp, except that I ...
1
vote
1answer
142 views

How to get Quantum GIS display a line or polygon feature created by Python package pyshp

I am not sure if I have discovered a regression, or if I have not enough sleep. While I manage to create shapefiles with point geometries with pyshp, line and polygon features don't show up in QGIS. ...
1
vote
1answer
123 views

How to add attributes to shapefile with Python and pyshp?

I'm using pyshp for creating a shapefile. I need to populate tens of fields with values using the record() method of shapefile.Writer. I have those values as a list, but have no idea how to send it to ...
3
votes
3answers
545 views

Updating Attributes using Pyshp

Is it possible to update an attribute field in a shapefile using pyshp ? I went through their documentation and all they show is how to create new attribute rather than editing or updating an already ...
6
votes
2answers
735 views

Error getting text attributes from shapefile with python / pyshp

I have a shapefile, containing only points in XY-coordinates and a string attribute for each point. I would like to read the coordinates and the attribute for postprocessing in python, but can't get ...
2
votes
2answers
429 views

Problems converting CSV to Shapefile using pyshp

I have a python script which converts csv data to shapefiles. It converts but won't get angle from csv. Can anyone help me? The CSV data looks like this: fid_nr;x;y;angle ...
5
votes
1answer
107 views

Where do I append point values with pyshp?

I would like to generate a .shp with five points using shapefile available through pyshp. However, when I loop through my list I get only the last value. This makes sense as I did not append any of ...
1
vote
1answer
131 views

How to construct a line from points in pyshp?

I am reading a shapefile for a pipeline and what I've noticed is that if I just draw a line from one point to the next (in the order I read them), there will be points where the line terminates, and ...
6
votes
1answer
2k views

Using the python shape library: pyshp - how to convert .csv file to .shp

I am trying to understand how I can use the csv module in python to open a csv file in the same folder as the python script, and then create a shapefile using the shapefile module pyshp. The csv file ...