-
Notifications
You must be signed in to change notification settings - Fork 33
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
Geometry inconsistencies [vector.cpp] #4
Comments
Can check with latest commit ? I fixed statistics computation (corrupted by parallel computation). Thanks for your interest in this little piece of software ! |
Perfect @cbalint13, seems correct now! Cheers! |
Thank you much for you efforts ! |
Yeap, sure! As soon I have the "ComputeGeometries" method done, I will pull-request! Thank you! :) |
Hi everyone, whats up?
cbalint13, well done for the code! Easy and fast implementation!
Im extending this code to extract basic geometries attributes from the segments, such as area, perimeter, width, elongation, rectangularity, so on. So, taking a look in vector.cpp file, I have noticed that the SavePolygon method agregates labelpixels.at(k) as an AREA value, which is somehow incorrect. I opened the final .shp file in QGIS to compare the results. Most of the AREA fields does not match with the $area outcomes from QGIS. I really did not get the meaning of these values.
Another issue is the multring==0 | 1 parameter. This made me crazy until find out what was going on. I mean... Some of the labels delivered by LSC algorithm, for instance, are disjoint, i.e, "different polygon" but same id. So... Reviewing following for-loop:
I see that a OGRFeature is created for each ring of a same Polygon, which would end up in many duplicate features in .shp file. Plus... each duplicate feature keeps the all attributes (avg, std, area, etc) respect to the first (multiring==0) feature.
So, in the end of the for-loop, instead of everytime create a new feature, I changed to set the feature:
to
but still... not working! Any better idea and solution for those issues, I would appreciate!
Thank you so much!
Rodolfo
The text was updated successfully, but these errors were encountered: