Note that there are some explanatory texts on larger screens.

plurals
  1. POOnly every 5th shape valid reading shapefile
    text
    copied!<p>I have a shapefile of drycleaning facilities in Florida. I am reading the file in Python using shapefile.py. My problem is that while the first shape in the file appears correct, after that only every 5th shape is correct. Four shapes in a row are extracted with an invalid type code (which should be between 0 and 31) and no point information. Here is a section of the results:</p> <pre><code>Site Name (.record[1]) .shapeType .points ------------------------------------ ----------- -------------------- Granda Dry Cleaners 21 [[783897.335, 215901.765]] Scotch Dry Cleaners 1093131927 [] J C Cleaners -1191051264 [] Royal Palm Cleaners -1606317767 [] Moorings Plaza Dry Cleaners 1091081765 [] Classic Touch Cleaners 21 [[778662.429, 221265.968]] The Drycleaner 1093095627 [] Randolphs Alterations &amp; Dry Cleaner -1140719616 [] Pelican French Cleaners 1580547967 [] Town &amp; Country Cleaners 1091080779 [] Discount Dryclean Outlet 21 [[768035.181, 188652.929]] The Drycleaner Cleaners 1093104359 [] Sample Cleaners -1090387968 [] Parisian Cleaners -1468878813 [] Roberts Cleaners &amp; Tailors 1091022843 [] </code></pre> <p>(note: I cut down the precision on the points a bit to make them fit on a line).</p> <p>The pattern appears to me to be regular — one "valid" record followed by four records with an invalid shapeType constant and no points.</p> <p>I am a novice at shapefile processing. Does these results suggest anything I may be doing incorrectly?</p> <p><strong>Update</strong></p> <p>The following code demonstrates the problem (it prints the shapeType and points columns described above):</p> <pre><code>from shapefile import Reader) rdr = Reader('drycleaner_list') for s in rdr.shapes(): print s.shapeType, s.points </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload