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

Implemented search for holes in the PolygonBoundaryFinderHelper #311

Conversation

Atria1234
Copy link
Collaborator

@Atria1234 Atria1234 commented Dec 16, 2020

obrazek

@FroggieFrog
Copy link
Collaborator

I think I'm missing something.
Is it a new feature or is it fixing a bug?
Is the provided image the before or after PR? (What is the opposite looking?)
What is the benefit of this PR? (To the user or the developer?)

@Atria1234
Copy link
Collaborator Author

I posted the "after" in the PR description, and here is the before:
obrazek

In some cases it looks weird to look something like this:
obrazek
right side being completely filled in, while left side looks like there is a "hole" but it is just polygon which touches itself.

But this wasn't the main reason why I finished implementing this, but I can't remember now. I know I wanted to use this searcher for something else which required holes to be returned as well. It lowers the performance during the true influence polygon calculation, but it can be easily turned off in AnnoCanvas (basically by reverting the changes in that file + probably some minor refactoring).

I'll close this and if I remember why I needed this I'll reopen.

@Atria1234 Atria1234 closed this Feb 1, 2021
@StingMcRay
Copy link
Contributor

I think it has to do with the Irrigation System you was making ... Not sure tho

@Atria1234
Copy link
Collaborator Author

Yeah, that's it. There could be a special overlay which iterates over all canals in the layout, generates bool[][] of irigated tiles and this algorithm could be used to show the area, correctly with holes.

I'll finish implementing this overlay and probably revert to just bounding polygon for the true influence range polygon calculation.

@Atria1234 Atria1234 reopened this Feb 5, 2021
@Atria1234
Copy link
Collaborator Author

I guess that irrigation canals don't have special property, that would distinguish them from other placed objects, do they? Other than its name.

@StingMcRay
Copy link
Contributor

No. it has not.

But does it need an extra marker, like road ?

@StingMcRay
Copy link
Contributor

If you link it to the Identifier, else you have all languages to check :
"Identifier": "WaterCanal"
and let us know if it needs more then only that.

@Atria1234
Copy link
Collaborator Author

Yeah, I'll probably use the Identified, but this if Anno 1800 specific function, where do you think it should be?

@StingMcRay
Copy link
Contributor

Around the code of your true influence range as that is also a Anno 1800 Specific function only

@FroggieFrog
Copy link
Collaborator

@Atria1234 @StingMcRay
Is there still an issue with this PR and canals? Or is it ready to merge?

@Atria1234
Copy link
Collaborator Author

I currently don't have time to implement the canal coverage functionality. Theoretically this PR can be merged and the canal coverage being implemented in another PR.

@FroggieFrog FroggieFrog merged commit cf4d4ab into AnnoDesigner:master Mar 17, 2021
@FroggieFrog FroggieFrog added this to the Anno Designer 8.9 Release milestone Mar 17, 2021
@Atria1234 Atria1234 deleted the feature/implement-holes-in-polygon-boundary-searcher branch June 4, 2021 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants