File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ The blockgroup key and population count:
305305
306306There is also an iterShapeRecords() method to iterate through large files:
307307
308+ 
308309    >>> shapeRecs = sf.iterShapeRecords() 
309310    >>> for shapeRec in shapeRecs: 
310311    ...     # do something here 
@@ -373,9 +374,13 @@ number of records equals the number of shapes to create a valid shapefile. You
373374must take care to add records and shapes in the same order so that the record
374375data lines up with the geometry data. For example:
375376
376-     >>> for feature in some_thing: 
377-     >>>     w.record(**feature['properties']) 
378-     >>>     w.poly(parts=feature['parts'] 
377+ 
378+ 	>>> w.field("field1", "C") 
379+ 	>>> w.field("field2", "C") 
380+     >>> w.record("row", "one") 
381+     >>> w.record("row", "two") 
382+     >>> w.point(1, 1) 
383+     >>> w.point(2, 2) 
379384
380385### Adding Geometry  
381386
@@ -604,6 +609,7 @@ ithub.com/sgillies/2217756](https://gist.github.com/sgillies/2217756). More
604609information on GeoJSON is available at
605610[ http://geojson.org ] ( http://geojson.org ) .
606611
612+ 
607613    >>> s = sf.shape(0) 
608614    >>> s.__geo_interface__["type"] 
609615    'MultiPolygon' 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments