1
vote
2answers
72 views

csv to shp python and formating a row

I´m doing a script to convert csv to shp, but I want to format one of the columns. It´s a string then I´d like to format like this a[8:10]+' / '+a[11:16]+' UTC' being a the value in the column. ...
1
vote
1answer
61 views

Using pyshp to merge two shapefiles

I am trying to find a fast way to merge two shapefiles and i ran over pyshp which apparently could do the job. However looks like this is not working for me because i receive the following error ...
0
votes
1answer
57 views

Howto create complex polygon with pyshp

using the pyshp library (https://code.google.com/p/pyshp/) I am trying to create a "complex" polgon with one hole inside the main-poly plus one island-poly. It should look like this: I used the ...
1
vote
1answer
61 views

pyshp problem with naturalearthdata-shapefile

trying to follow this example: https://code.google.com/p/pyshp/wiki/ShapeRecords entering the following code: import shapefile r = shapefile.Reader("ne_110m_admin_0_countries") sr = r.shapeRecords() ...
1
vote
3answers
496 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
72 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
143 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
124 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 ...
1
vote
0answers
205 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
3answers
2k 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
158 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
140 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
704 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
808 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
487 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
115 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
150 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
3k 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 ...