Changeset 17612


Ignore:
Timestamp:
03/31/14 22:49:47 (11 years ago)
Author:
cborstad
Message:

BUG: fixed shp2exp for point shapefiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/shp/shp2exp.py

    r17542 r17612  
    2828        expdict=dict(closed=1,density=1)
    2929
    30 
     30        x=[]
     31        y=[]
    3132        for i in range(len(shp.shapes())):
    3233                geom=shp.shapes()[i].shapeType
     
    4647                        expdict['nods']=len(x)
    4748                elif geom==1: # point
    48                         x=[p[0] for p in shp.shapes()[i].points]
    49                         y=[q[1] for q in shp.shapes()[i].points]
     49                        x.append(shp.shapes()[i].points[0][0])
     50                        y.append(shp.shapes()[i].points[0][1])
    5051                        expdict['x']=x
    5152                        expdict['y']=y
Note: See TracChangeset for help on using the changeset viewer.