text stringlengths 0 93.6k |
|---|
cmd = "lasoverage.exe" + \ |
" -i %s" % (filespec) + \ |
" -step %.3f" % (cutresolution) + \ |
" -odir %s" % (dstfolder)+ \ |
" -cpu64" + \ |
strcores + \ |
" -v" + \ |
" -odix _overage" + \ |
" -remove_overage" + \ |
" -epsg %s" % (epsg) + \ |
" -olaz" |
stdout, stderr = runner(cmd, verbose) |
############################################################################### |
def lasoveragenew(srcfolder, dstfolder, filespec, resolution=1, overageresolution=1, epsg='31984', verbose=False): |
'''clip out overlapping data from a series of files, to produce non-overlapped data files''' |
# make a list and sort instead of a wildcard. maybe this helps how overage works? |
# files = findFiles2(False, srcfolder, "*.laz") |
# files.sort() |
# filespec = "" |
# for f in files: |
# filespec = filespec + " " + f |
cpu = getcpucount(0) |
strcores = " -cores %s" % (cpu) |
log("Processing with %d CPU's" %(cpu)) |
filespec = os.path.join(srcfolder, filespec) |
filespec = filespec.replace('\\','/') |
print ("******Overage2 files to process: %s" % (filespec)) |
print ("******Overage2 output folder: %s" % (dstfolder)) |
dstfolder = dstfolder.replace('\\','/') |
# odirlog = makedirs(dstfolder) |
if float(overageresolution) == 0: |
cutresolution = float(resolution) |
else: |
cutresolution = float(overageresolution) |
print ("******Overage Resolution: %.3f, Grid Resolution %.3f" % (cutresolution, float(resolution))) |
# #we need to ensure we dont cause edge effects |
# resolution = float(resolution) / 4 #pkpk we needed to make this 1 for the cross lines in A14 as the infill did not work well. not sure whats is happening yet. |
cmd = "lasoverage.exe" + \ |
" -i %s" % (filespec) + \ |
" -step %.3f" % (cutresolution) + \ |
" -odir %s" % (dstfolder)+ \ |
" -v" + \ |
" -remove_overage" + \ |
" -odix _overage" + \ |
" -epsg %s" % (epsg) + \ |
" -olaz" + \ |
" -cpu64" + \ |
strcores + \ |
" -files_are_flightlines" |
stdout, stderr = runner(cmd, verbose) |
return [stdout, stderr] |
############################################################################### |
def lasduplicate2(filename, outfilename): |
'''remove duplicate records from a file and rename the file at the end''' |
# odirlog = makedirs(os.path.dirname(filename)) |
filename = filename.replace('\\','/') |
outfilename = outfilename.replace('\\','/') |
cmd = "lasduplicate64.exe" + \ |
" -i %s" % (filename) + \ |
" -olaz " + \ |
" -o %s" % (outfilename) |
# " -drop_x_below %s" % (str(10))+ \ |
stdout, stderr = runner(cmd, False) |
return outfilename |
############################################################################### |
def lasduplicate(filename): |
'''remove duplicate records from a file and rename the file at the end''' |
odirlog = makedirs(os.path.dirname(filename)) |
outfilename = os.path.join(os.path.dirname(filename), "uniq.laz") |
outfilename = outfilename.replace('\\','/') |
cmd = "lasduplicate64.exe" + \ |
" -i %s" % (filename) + \ |
" -drop_x_below %s" % (str(10))+ \ |
" -olaz " + \ |
" -o %s" % (outfilename) |
stdout, stderr = runner(cmd, False) |
#now delete the original filename and rename the temp file to the original |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.