Changeset 19422
- Timestamp:
- 07/03/15 00:43:23 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/shp/shp2exp.py
r17612 r19422 33 33 geom=shp.shapes()[i].shapeType 34 34 if geom==5: # polygon 35 x=[p[0] for p in shp.shapes()[i].points] 36 y=[q[1] for q in shp.shapes()[i].points] 37 expdict['x']=x 38 expdict['y']=y 39 expdict['nods']=len(x) 35 tmpx=[p[0] for p in shp.shapes()[i].points] 36 tmpy=[q[1] for q in shp.shapes()[i].points] 37 #x.extend(tmpx) 38 #y.extend(tmpy) 39 x.append(tmpx) 40 y.append(tmpy) 40 41 elif geom==3: # line 41 42 x=[p[0] for p in shp.shapes()[i].points] … … 43 44 x.append(x[0]) 44 45 y.append(y[0]) 45 expdict['x']=x46 expdict['y']=y47 expdict['nods']=len(x)48 46 elif geom==1: # point 49 47 x.append(shp.shapes()[i].points[0][0]) 50 48 y.append(shp.shapes()[i].points[0][1]) 51 expdict['x']=x52 expdict['y']=y53 expdict['nods']=len(x)54 49 55 expwrite([expdict],expfile) 50 expdict['x']=x 51 expdict['y']=y 52 expwrite(expdict,expfile)
Note:
See TracChangeset
for help on using the changeset viewer.