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
ROIGeometry must handle the emtpy geometry case #225
Comments
Sounds good Andrea. Are you working on it or do you want me to have a look ? |
I'm not working on it right now. So if you feel bored go right ahead :-) |
I've been adding some unit tests in which ROIGeometry is passed an empty Geometry but haven't seen any failures yet. Can you give me an example that provokes an error ? |
I've seen it happening as one tries to get and use the image version of the roigeometry out of an empty geometry |
Cool - I'll delve into that |
OK - so I see the problem now. How best to handle it ? JAI doesn't seem to like creating empty images (ImageLayout constructor throws an exception if passed zero width / height). Maybe add a new ImageOp for an empty image which could be used by VectorBinarize when the geometry is empty ? Would that work with your use cases Andrea ? Other ideas also welcome :) |
Stumbled into this one again... we need to check what ROIShape is doing in the same situation. |
Ok, tested it with ROIShape, and it just fails:
results in:
Sooo... I must have been seeing things! Closing for the moment, until I have a new vision :-p |
While working with imagery it may happen that a call to intersect results in an empty geometry, but ROIGeometry fails if passed an empty one. We should behave normally with it too (it's just a case in which the ROI is empty)
The text was updated successfully, but these errors were encountered: