Example #1
0
File: Cover.py Project: mdrom/PyAML
   w = Cover('i5308wm',file)
   fjunc = f.reselect('arc',"feat_code = 'junction'")
   wjunc = w.reselect('arc',"lpoly# = 1 | rpoly# = 1")
   wjunc2 = wjunc.reselect('arc',"feat_code = 'junction'")
   fjbuf = fjunc.buffer(1,'line')
   wjbuf = wjunc2.buffer(1,'line')
   wfunion = fjbuf.union(wjbuf)
   wfunion.addxy()

   cur = Cursor(wfunion,'polygon','ro','%s-id = 0 & area > 0'% fjbuf.name)
   proc = '''
          &ty
          &ty Waterbody junction does not have corresponding framework junction
          &ty at [truncate %s],[truncate %s]
          &ty
          ''' % (cur.getitem('x-coord'),cur.getitem('y-coord'))

   cur.iterate(proc)
   cur.remove()

   cur = Cursor(wfunion,'polygon','ro','%s-id = 0 & area > 0' % wjbuf.name)
   proc = '''
          &ty
          &ty Framework junction does not have corresponding waterbody junction
          &ty at [truncate %s],[truncate %s]
          &ty
          ''' % (cur.getitem('x-coord'),cur.getitem('y-coord'))

   cur.iterate(proc)
   cur.remove()