Forum

Author Topic: Set bounding box from shapefile  (Read 1180 times)

juacarri

  • Newbie
  • *
  • Posts: 15
    • View Profile
Set bounding box from shapefile
« on: February 19, 2023, 12:41:55 PM »
Hi! Is it possible to set a bounding box from the maximum and minimum coordinates of a shapefile? I want to obtain a dense cloud of a small area of my project

juacarri

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Set bounding box from shapefile
« Reply #1 on: February 19, 2023, 07:15:51 PM »
I have created a small script to set the bounding box (bbox) of Metashape from the bounding boxes of a shapefile (.SHP).

This script is useful for users that have performed the alignment of a large area and want to continue the processing (dense point cloud, mesh, etc.) of a smaller area delimited by the boundaries of a SHP file.

I attached the script to this post in case it is useful to anyone.

bisenberger

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Digital Mapping & Graphics
Re: Set bounding box from shapefile
« Reply #2 on: February 19, 2023, 08:39:05 PM »
Thanks juacarri
Digital Mapping & Graphics LLC
https://digital-mapping.net/

bisenberger

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Digital Mapping & Graphics
Re: Set bounding box from shapefile
« Reply #3 on: February 20, 2023, 09:16:55 PM »
I received this error message when I ran the script:

142, in _import
2023-02-20 12:14:02     return original_import(name, *args, **kwargs)
2023-02-20 12:14:02 ModuleNotFoundError: No module named 'fiona'
2023-02-20 12:14:02 Error: No module named 'fiona'


This thread has a script to crop the tie point cloud based on the single selected polygonal shape.

https://www.agisoft.com/forum/index.php?topic=13318.0
« Last Edit: February 20, 2023, 09:22:04 PM by bisenberger »
Digital Mapping & Graphics LLC
https://digital-mapping.net/