open-forest-observatory / geograypher

Multiview Semantic Reasoning with Geospatial Data
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Add ability to subset mesh based on geodata/geofile #24

Closed russelldj closed 8 months ago

russelldj commented 8 months ago

There are a number of applications where taking a subset of the mesh could be really helpful. The two that come to mind are doing train/test splits and improving runtime when there's a lot of un-annotated or un-needed regions of the mesh.

I think this should be fairly easy to implement with pyvista's [extract_points](https://docs.pyvista.org/version/stable/api/core/_autosummary/pyvista.DataSetFilters.extract_points.html). I'd propose to have a TexturedPhotogrammetryMesh method that returns a subset of the mesh based on a geopandas GeoDataFrame, a filepath that can be loaded by geopandas, or a shapely object. I think having a buffer radius would be useful, so this region can be dilated or eroded appropriately. Finally, it may be worth considering adding this option to the constructor since it seems widely applicable.