Skip to content

Commit

Permalink
update name attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
alavenant committed May 17, 2024
1 parent bc35369 commit 20cac64
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
9 changes: 5 additions & 4 deletions doc/grid_radius_assign.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ This pipeline updates the Keypoint dimension of all points with classification 1
"src_domain" : "Classification[1:2]",
"reference_domain" : "Classification[6:6]",
"radius" : 1,
"output_name_attribut": "radius"
"output_name_attribut": "radius",
"is3d": True
},
"output.las"
]
Expand All @@ -43,9 +44,9 @@ Options

**output_name_attribut**: The name of the new attribute'. [Default: radius]

**3d_search**: Search in 3d (as a ball). [Default: false]
**is3d**: Search in 3d (as a ball). [Default: false]

**2d_search_above**: If 3d_search is false, take points only if exists points between the referent point and a distance above. [Default: 0.]
**is2d_above**: If is3d is false, take points only if exists points between the referent point and a distance above. [Default: 0.]

**2d_search_bellow**: If 3d_search is false, take points only if exists points between the referent point and a distance bellow. [Default: 0.]
**is2d_bellow**: If is3d is false, take points only if exists points between the referent point and a distance bellow. [Default: 0.]

2 changes: 1 addition & 1 deletion macro/macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def add_radius_assign(pipeline, radius, search_3d, condition_src, condition_ref,
"REF_DOMAIN = 0", f"REF_DOMAIN = 1 WHERE {condition_ref}",
"radius_search = 0"])
pipeline |= pdal.Filter.radius_assign(radius=radius, src_domain="SRS_DOMAIN",reference_domain="REF_DOMAIN",
output_dimension="radius_search", search_3d=search_3d)
output_dimension="radius_search", is3d=search_3d)
pipeline |= pdal.Filter.assign(value=condition_out,where="radius_search==1")
return pipeline

Expand Down
6 changes: 3 additions & 3 deletions src/filter_radius_assign/radius_assignFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ void RadiusAssignFilter::addArgs(ProgramArgs& args)
args.add("reference_domain", "Selects which points will be considered as potential neighbors", m_args->m_referenceDomain, "REF_DOMAIN");
args.add("radius", "Distance of neighbors to consult", m_args->m_radius, 1.);
args.add("output_dimension", "Name of the added attribut", m_args->m_outputDimension, "radius");
args.add("search_3d", "Search in 3d", m_args->search3d, false );
args.add("search_2d_above", "if search in 2d : filter point above the distance", m_args->m_search_bellow, 0.);
args.add("search_2d_bellow", "if search in 2d : filter point bellow the distance", m_args->m_search_above, 0.);
args.add("is3d", "Search in 3d", m_args->search3d, false );
args.add("is2d_above", "if search in 2d : filter point above the distance", m_args->m_search_bellow, 0.);
args.add("is2d_bellow", "if search in 2d : filter point bellow the distance", m_args->m_search_above, 0.);
}

void RadiusAssignFilter::addDimensions(PointLayoutPtr layout)
Expand Down
6 changes: 3 additions & 3 deletions test/test_radius_assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def run_filter(arrays_las, distance_radius, search_3d, distance_cylinder=0. ):
"src_domain": "SRS_DOMAIN",
"reference_domain": "REF_DOMAIN",
"output_dimension": "radius_search",
"search_3d": search_3d,
"search_2d_above": distance_cylinder,
"search_2d_bellow": distance_cylinder,
"is3d": search_3d,
"is2d_above": distance_cylinder,
"is2d_bellow": distance_cylinder,
}
]

Expand Down

0 comments on commit 20cac64

Please sign in to comment.