kopia lustrzana https://github.com/OpenDroneMap/ODM
Removed write_extra_dimensions parameter
rodzic
02b92d322c
commit
fa3eb4af96
|
@ -46,7 +46,7 @@ def classify(lasFile, scalar, slope, threshold, window):
|
|||
log.ODM_INFO('Created %s in %s' % (lasFile, datetime.now() - start))
|
||||
return lasFile
|
||||
|
||||
def rectify(lasFile, debug=False, reclassify_threshold=5, min_area=750, min_points=500):
|
||||
def rectify(lasFile, reclassify_threshold=5, min_area=750, min_points=500):
|
||||
start = datetime.now()
|
||||
|
||||
pcFile = lasFile
|
||||
|
@ -55,7 +55,7 @@ def rectify(lasFile, debug=False, reclassify_threshold=5, min_area=750, min_poin
|
|||
|
||||
log.ODM_INFO("Rectifying {} using with [reclassify threshold: {}, min area: {}, min points: {}]".format(lasFile, reclassify_threshold, min_area, min_points))
|
||||
run_rectification(
|
||||
input=pcFile, output=pcFile, debug=debug, \
|
||||
input=pcFile, output=pcFile, \
|
||||
reclassify_plan='median', reclassify_threshold=reclassify_threshold, \
|
||||
extend_plan='surrounding', extend_grid_distance=5, \
|
||||
min_area=min_area, min_points=min_points)
|
||||
|
|
|
@ -43,8 +43,7 @@ def safe_add_metadata(pipeline, metadata, key, sourcekey=None):
|
|||
pipeline["pipeline"][0][key] = metadata[k]
|
||||
|
||||
|
||||
def write_cloud(metadata, point_cloud, output_point_cloud_path, write_extra_dimensions=False):
|
||||
|
||||
def write_cloud(metadata, point_cloud, output_point_cloud_path):
|
||||
|
||||
# Adapt points to scale and offset
|
||||
x, y = np.hsplit(point_cloud.xy, 2)
|
||||
|
@ -83,7 +82,8 @@ def write_cloud(metadata, point_cloud, output_point_cloud_path, write_extra_dime
|
|||
{
|
||||
"type": "writers.las",
|
||||
"filename": output_point_cloud_path,
|
||||
"compression": "laszip"
|
||||
"compression": "laszip",
|
||||
"extra_dims": "all"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -107,9 +107,6 @@ def write_cloud(metadata, point_cloud, output_point_cloud_path, write_extra_dime
|
|||
|
||||
#pdb.set_trace()
|
||||
|
||||
if write_extra_dimensions:
|
||||
writer_pipeline["pipeline"][0]["extra_dims"] = "all"
|
||||
|
||||
# The metadata object contains the VLRs as fields called "vlr_N" where N is the index of the VLR
|
||||
# We have to copy them over to the writer pipeline as a list of dictionaries in the "vlrs" field
|
||||
writer_pipeline["pipeline"][0]["vlrs"] = []
|
||||
|
|
|
@ -23,7 +23,7 @@ def run_rectification(**kwargs):
|
|||
if 'extend_plan' in kwargs and kwargs['extend_plan'] is not None:
|
||||
point_cloud = extend_cloud(point_cloud, kwargs['extend_plan'], kwargs['extend_grid_distance'], kwargs['min_points'], kwargs['min_area'])
|
||||
|
||||
write_cloud(header, point_cloud, kwargs['output'], kwargs['debug'])
|
||||
write_cloud(header, point_cloud, kwargs['output'])
|
||||
|
||||
def reclassify_cloud(point_cloud, plan, threshold, min_points, min_area):
|
||||
# Get only ground
|
||||
|
|
|
@ -72,7 +72,7 @@ class ODMDEMStage(types.ODM_Stage):
|
|||
self.update_progress(progress)
|
||||
|
||||
if args.pc_rectify:
|
||||
commands.rectify(dem_input, False)
|
||||
commands.rectify(dem_input)
|
||||
|
||||
# Do we need to process anything here?
|
||||
if (args.dsm or args.dtm) and pc_model_found:
|
||||
|
|
Ładowanie…
Reference in New Issue