def fast_iter(context): total_ps = [] building_count = 0 for event, element in context: flag = False if element.tag.endswith('Building'): building_count = building_count + 1 if element.get('{http://www.opengis.net/gml}id' ) == 'GUID_1TRE8quZ16sRs1mpyCTSpo': building = Building(element) building_ps = building.getPolygon() total_ps.append(building_ps) # print one building # if building_count==10: # break del building flag = True if flag: element.clear() # buildingcount: 192 print "buildingcount:", building_count del context util.saveobj(total_ps, './citygml_data/obj/building_onewall2.obj')
def fast_iter(context): total_ps = [] building_count = 0 for event, element in context: flag = False if element.tag.endswith('Building'): building_count = building_count + 1 if 8 >= building_count > 7: building = Building(element) building_ps = building.getPolygon() print 'buildingcount:', building_count print 'building.id:', element.get( '{http://www.opengis.net/gml}id') total_ps.append(building_ps) # print "total_ps:",total_ps # print one building # if building_count==5: # break del building flag = True if flag: element.clear() else: continue # buildingcount: 192 # print "buildingcount:",building_count del context util.saveobj(total_ps, './citygml_data/obj/8-8_complete_building.obj')
def fast_iter(context): total_ps = [] building_count = 0 for event, element in context: flag = False if element.tag.endswith('Building'): building_count = building_count + 1 # if element.get('{http://www.opengis.net/gml}id')=='GUID_2WDZgTEoX8mujY3ORbyiZ9': #8face if element.get('{http://www.opengis.net/gml}id' ) == 'GUID_3EYbphh5zBze18EkzdRCRZ': building = Building(element) building_ps = building.getPolygon() total_ps.append(building_ps) # print one building # if building_count==10: # break del building flag = True if flag: element.clear() # buildingcount: 192 print "buildingcount:", building_count del context util.saveobj(total_ps, './citygml_data/obj/s4w_two_floors_inandoutwall.obj') print 'total_ps: ', total_ps
def fast_iter(context): total_ps = [] building_count = 0 for event, element in context: flag = False if element.tag.endswith('Building'): building_count = building_count + 1 building = Building(element) building_ps = building.getPolygon() print 'building.id:', element.get('{http://www.opengis.net/gml}id') total_ps.append(building_ps) # print one building if building_count == 1: break del building flag = True if flag: element.clear() # buildingcount: 192 print "buildingcount:", building_count del context # util.saveobj(total_ps, './citygml_data/obj/one building_wall_0.4_5.obj') # print 'total_ps: ', total_ps # print "len(total_ps):" ,len(total_ps) util.saveobj([find_wall2.FindWalls(total_ps)], './citygml_data/obj/one building_wall_0.4_13.obj')
def fast_iter(context): total_ps = [] building_count = 0 for event, element in context: flag = False if element.tag.endswith('Building'): building_count = building_count + 1 if element.get('{http://www.opengis.net/gml}id') == 'ID_92': building = Building(element) building_ps = building.getPolygon() total_ps.append(building_ps) # print one building # if building_count==10: # break del building flag = True if flag: element.clear() # buildingcount: 192 print "buildingcount:", building_count del context util.saveobj( total_ps, '/home/huangby/PycharmProjects/basestudy2/citygml_analysis/citygml_data/obj/building_lod2wall.obj' )
def fast_iter(context): total_ps = [] building_count=0 for event, element in context: flag = False if element.tag.endswith('Building'): building_count = building_count+1 building = Building(element) building_ps = building.getPolygon() total_ps.append(building_ps) # print one building if building_count==2: break del building flag = True if flag: element.clear() print "buildingcount:",building_count del context util.saveobj(total_ps, './citygml_data/obj/1234.obj')