def LL2UTM(self, outfile="tmp.xyz", LatLon=False): def converter(xyz): if(LatLon==True): Zone, Easting, Northing = libUTM.LLtoUTM(23,xyz[0],xyz[1]) else: Zone, Easting, Northing = libUTM.LLtoUTM(23,xyz[1],xyz[0]) return Easting, Northing, xyz[2] output = libIO.write(outfile) [output.a([converter(xyz) for xyz in XYZ]) for XYZ in self.input.a()] output.close()
def LL2UTM(self, outfile="tmp.xyz", LatLon=False): def converter(xyz): if (LatLon == True): Zone, Easting, Northing = libUTM.LLtoUTM(23, xyz[0], xyz[1]) else: Zone, Easting, Northing = libUTM.LLtoUTM(23, xyz[1], xyz[0]) return Easting, Northing, xyz[2] output = libIO.write(outfile) [output.a([converter(xyz) for xyz in XYZ]) for XYZ in self.input.a()] output.close()
def replace(self, outfile, new_delimiter=" "): output = libIO.write(outfile, new_delimiter) [output.a(XYZ) for XYZ in self.input.a()] output.close()