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

Better error notify when ROI is too small than one pixel #40

Closed
HowcanoeWang opened this issue Aug 20, 2022 Discussed in #39 · 0 comments
Closed

Better error notify when ROI is too small than one pixel #40

HowcanoeWang opened this issue Aug 20, 2022 Discussed in #39 · 0 comments
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@HowcanoeWang
Copy link
Member

Discussed in #39

Originally posted by Ken-Kuroki August 19, 2022
Hi, I encountered an error with certain DSM files. When I run

roi = easyidp.ROI("roi.shp")
roi.get_z_from_dsm("dsm.tif")

Then Exception has occurred: UnboundLocalError (note: full exception trace is shown but execution is paused at: _run_module_as_main) local variable 'imarray_out' referenced before assignment at the 109 line of cvtools.py.

It looks when dim==1 the variable isn't set. I eventually figured out the DSM file resolution was not enough and with small plots in my .shp file, probably each plot only made up an area smaller than one pixel. The error was solved after increasing the DSM image size.

I don't think this is an issue, but just sharing since other users may find the same error.

@HowcanoeWang HowcanoeWang added the good first issue Good for newcomers label Aug 20, 2022
@HowcanoeWang HowcanoeWang added this to the 2.0.1 milestone Aug 20, 2022
@HowcanoeWang HowcanoeWang self-assigned this Aug 20, 2022
HowcanoeWang added a commit that referenced this issue Aug 20, 2022
Fix the discussion #39 and issue #40
@HowcanoeWang HowcanoeWang moved this to Done in EasyIDP v2.0 Aug 20, 2022
@HowcanoeWang HowcanoeWang modified the milestones: 2.0.1, 2.0.0.dev3 Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Done
Development

No branches or pull requests

1 participant