Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First you need to determine if the problem is with the shapefile. Try loading the file using a true GIS tool such as QuantumGIS. Once you are sure your SHP file is correct, post your code so we can see how you are using shapefile.py. My guess is that the SHP file is incorrect in some way andn Quantum GIS will either fix it or tell you whats wrong. Bonus: QuantumGIS has python embeded as a plugin development tool.</p> <p><strong>EDIT:</strong> I downloaded the file dryclean_apr12.shp from the Florida DEP. According to the dbf data, there are 1423 records. When I use your code snippet I get 1423 shapes all of shapetype=1 which indicates that each shape is a single point.</p> <p>Therefore your code is correct, the issue has to be with the file.</p> <p>I noticed in your sample data that the shapetype is 21 or a PointM which is defined as </p> <p>Position Field Value Type Number Order</p> <pre><code>Byte 0 Shape Type 21 Integer 1 Little Byte 4 X X Double 1 Little Byte 12 Y Y Double 1 Little Byte 20 M M Double 1 Little </code></pre> <p>A Point is defined as </p> <pre><code>Position Field Value Type Number Order Byte 0 Shape Type 1 Integer 1 Little Byte 4 X X Double 1 Little Byte 12 Y Y Double 1 Little </code></pre> <p>Either the Shapefile is corrupt or there is a bug in shapefile.py.</p> <p>A Shapefile with PointM has a layout of </p> <pre><code>IDDD IDDD IDDD IDDD IDDD IDDD </code></pre> <p>If Shapefile is reading this as a Point (IDD)</p> <p>Then the file is read as </p> <pre><code>IDD Rec 1 Read OK did Rec 2 Error on Type ddi Rec 3 error on Type ddd Rec 4 error on Type IDD Rec 5 Read OK </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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