Forum

Author Topic: Determine amount of points inside a selected boundary  (Read 9050 times)

josieellalynch

  • Newbie
  • *
  • Posts: 9
    • View Profile
Determine amount of points inside a selected boundary
« on: December 03, 2020, 05:44:51 PM »
Hello!

I am trying to determine the point density within a selected area. For example, I would like to draw a 1x1m polygon and Metashape tell me the number of points in that area and repeat this in a different location on the same model. Is this possible? I know that I can draw a boundary on the DEM/ortho but I'm not sure how to draw the polygon to a set size on the dense point cloud.

Alternately, is it possible to do this in CloudCompare? Export the dense point cloud from Metashape to CloudCompare and create to 1x1m polygon this way?

I'm fairly new to Metashape so thank you in advance!

Josie  :D

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15673
    • View Profile
Re: Determine amount of points inside a selected boundary
« Reply #1 on: December 03, 2020, 05:52:50 PM »
Hello Josie,

At the moment only a clumsy workaround comes to my mind:
- draw shape,
- set shape type as outer boundary,
- export points with "clip to boundary shapes" option enable,
- import the exported file as temporary dense cloud in the same chunk, get its point number,
- repeat for the next shape.

If the shapes are already drawn and put to the same shape layer, such procedure can be automated using Python.

Actually, if needed, drawing 1x1 m polygons can be also performed using Python, if you know the origin of the grid, where from the drawing should start.
Best regards,
Alexey Pasumansky,
Agisoft LLC

josieellalynch

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Determine amount of points inside a selected boundary
« Reply #2 on: December 03, 2020, 06:02:40 PM »
Ok! Fantastic thank you I'll try that!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15673
    • View Profile
Re: Determine amount of points inside a selected boundary
« Reply #3 on: December 03, 2020, 06:41:47 PM »
Via GUI it can be done in the manual way by selecting dense cloud points by shape (via Tools menu), cropping the dense cloud, then waiting till the point stats are updated and restoring the point cloud with Undo button.
Best regards,
Alexey Pasumansky,
Agisoft LLC

josieellalynch

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Determine amount of points inside a selected boundary
« Reply #4 on: December 03, 2020, 06:48:15 PM »
Ok great thanks!

Do you know whether it is possible to draw a 1x1m square to crop the dense point cloud in GUI? I am not able to work out how to draw a polygon to a selected size.

Sorry for the silly Qs haha!

Thanks again :)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15673
    • View Profile
Re: Determine amount of points inside a selected boundary
« Reply #5 on: December 03, 2020, 07:15:48 PM »
Hello Josie,

Currently it is not possible to draw the polygon of the fixed size in Metashape via GUI. If you can draw it in the external GIS application, you can import such shape from file (in KML, SHP, DXF or GeoJSON format).
Best regards,
Alexey Pasumansky,
Agisoft LLC

josieellalynch

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Determine amount of points inside a selected boundary
« Reply #6 on: December 03, 2020, 08:18:00 PM »
Ok I will try this, thank you!