Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Task grid does not trim to the area of interest for mapping #6638

Open
Jorieke opened this issue Nov 19, 2024 · 3 comments
Open

[BUG] Task grid does not trim to the area of interest for mapping #6638

Jorieke opened this issue Nov 19, 2024 · 3 comments

Comments

@Jorieke
Copy link

Jorieke commented Nov 19, 2024

Describe the bug
I'm a project manager that does want to create a new project on the HOT TM. I import a file as my area of interest and want to create small tasks of it. When I use the trim functionality, it does not fully trim back to my area of interest. My whole area of interest is not covered by tasks.

To Reproduce
Steps to reproduce the behavior:

  1. Click Manage
  2. Create new project
  3. Step 1: Define area > Select file > select geojson file from my computer > Next
  4. Step 2: Set task sizes > smaller ( I want to have tasks size 0.08km2) > Next
  5. Step 3: Trim Task Grid > Trim
    This is where you see that the trimming excludes some of the parts of the area of interest.

Screenshots
When clicking just Trim:
image

When checking Trim the tasks to define the exact Area of Interest for Mapping. And than Trim:
image

In orange you see the area of interest I uploaded, which is thus not completely covered by task areas.

Attached you can find as well the area of interest that I am using for this.
AoI for HOT TM.zip

@SColchester
Copy link

Just tested and I got the same problem, this is the first time I've come across this issue and must be related to the method that TM uses to select tasks for trimming. @ramyaragupathy is there any more info you can give us on how the trim process works - and could TM shift to a more 'inclusive' trim method that would enure that the AOI is always fully covered by tasks?

@ramyaragupathy
Copy link
Member

cc @prabinoid @manjitapandey

@prabinoid
Copy link
Contributor

Findings:
The code first checks if a grid tile (tile) is fully within the AOI using the aoi_multi_polygon.contains(tile) condition.
If the tile is completely contained, it is directly added to the intersecting_features list without further modifications.
If the tile is not fully contained, the code calculates the intersection of the tile with the AOI.
If the intersection is empty it is skipped (Correct) or if it is not of type Polygon or MultiPolygon, the tile is skipped again. (Cause of the problem).
Otherwise, the intersected portion of the tile is clipped to the AOI, and the modified feature is added to intersecting_features
So,
When a tile partially overlaps the AOI, the intersection can sometimes result in geometry types like GeometryCollection or LineString, which are not handled by the current implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants