lannymac / pyshp

Automatically exported from code.google.com/p/pyshp
MIT License
0 stars 0 forks source link

Missing record fields #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download the dataset from 
http://www1.toronto.ca/wps/portal/open_data/open_data_item_details?vgnextoid=9ec
d5f9cd70bb210VgnVCM1000003dd60f89RCRD&vgnextchannel=6e886aa8cc819210VgnVCM100000
67d60f89RCRD
2. Run this sample program to print all of the records

import shapefile
sf = shapefile.Reader("TCL3_Centreline_OD_bikeways")
shapes = sf.shapes()
records = sf.records()

for index, i in enumerate(shapes):
    print records[index]

3. search through the CP_TYPE column for data. I grepped the output of my 
python program for the work bike
python test.py | grep -i "bike"

What is the expected output? What do you see instead?
The CP_TYPE column should have data like "Bike Lanes", "Signed Routes", 
"Suggested On-Street Routes", ... but it is always empty

What version of the product are you using? On what operating system?
OSX Snow Leopard 
Python 2.6.1
pyshp 1.0.5
Bikeway data was updated March 2011

I get the expected output using other code like this guys 
http://indiemaps.com/blog/2008/03/easy-shapefile-loading-in-python/

Original issue reported on code.google.com by nab...@gmail.com on 3 Sep 2011 at 4:55

GoogleCodeExporter commented 9 years ago

Original comment by geospati...@gmail.com on 5 Sep 2011 at 4:49

GoogleCodeExporter commented 9 years ago
Good catch!  Major bug but fortunately a very simple fix.

Original comment by geospati...@gmail.com on 5 Sep 2011 at 4:27

GoogleCodeExporter commented 9 years ago
Wow! You guys are awesome. Thanks for the great open source software.

Original comment by nab...@gmail.com on 6 Sep 2011 at 2:15