Forum

Author Topic: Command python - Detect Power lines  (Read 966 times)

Yannick - Creat 31

  • Newbie
  • *
  • Posts: 1
    • View Profile
Command python - Detect Power lines
« on: July 06, 2022, 11:09:01 AM »
Hello,

Is there a python command to launch the "Detect Power lines" tool?

I searched in the Metashape Python Reference, I didn't find anything.

Thanks

Diogo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Detect Powerlines missing in Python API
« Reply #1 on: August 19, 2022, 04:00:04 PM »
Hi all,

I've been looking for the detect Powerlines function in the Python API, but it appears to be not in the manual. Is the function not available in the API?

DocPopi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Detect Powerlines missing in Python API
« Reply #2 on: August 22, 2022, 04:41:59 PM »
Hi! I've found a mention of powerlines p.184 of the Python API reference (version 1.8.4), mentioning it's part of the PlanMission class. Have you seen it?

Hope it can help,

Best,

Popi

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13913
    • View Profile
Re: Detect Powerlines missing in Python API
« Reply #3 on: August 22, 2022, 04:57:34 PM »
Hello all,

Detect powerlines feature has been added to Python API in 1.8.5 pre-release:
Quote
detectPowerlines(...) method of Metashape.Chunk instance
     detectPowerlines(min_altitude=1, n_points_per_line=11, use_model=True, [progress])
     
     Detect powerlines for the chunk.
     
     :arg min_altitude: Minimum altitude for reconstructed powerlines.
     :type min_altitude: float
     :arg n_points_per_line: Number of vertices per detected line.
     :type n_points_per_line: int
     :arg use_model: Use model for visibility checks.
     :type use_model: bool
     :arg progress: Progress callback.
     :type progress: Callable[[float], None]

Find the links to pre-release below:
https://s3-eu-west-1.amazonaws.com/download.agisoft.com/metashape-pro_1_8_5_x64.msi                             Windows
https://s3-eu-west-1.amazonaws.com/download.agisoft.com/metashape-pro_1_8_5.dmg                                    macOS
https://s3-eu-west-1.amazonaws.com/download.agisoft.com/metashape-pro_1_8_5_amd64.tar.gz                   Linux

https://s3-eu-west-1.amazonaws.com/download.agisoft.com/Metashape-1.8.5-cp35.cp36.cp37.cp38-none-win_amd64.whl                                                                          Windows
https://s3-eu-west-1.amazonaws.com/download.agisoft.com/Metashape-1.8.5-cp35.cp36.cp37.cp38-abi3-macosx_11_0_universal2.macosx_10_13_x86_64.whl        macOS
https://s3-eu-west-1.amazonaws.com/download.agisoft.com/Metashape-1.8.5-cp35.cp36.cp37.cp38-abi3-linux_x86_64.whl                                                                         Linux
« Last Edit: August 22, 2022, 04:59:32 PM by Alexey Pasumansky »
Best regards,
Alexey Pasumansky,
Agisoft LLC

Diogo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Command python - Detect Power lines
« Reply #4 on: August 23, 2022, 12:39:13 PM »
Thats great! Thanks.