Closed pmelchior closed 5 years ago
So pymangle
only works with mangle files that have the pixels associated with them, so you need to run that mangle task first which adds the pixel and area.
Hmm, the description of the code says it works without pixelization but I don't know if that's ever been tested! Certainly not how I thought the code was supposed to be run.
the code does work without pixelization
This change will be straightforward but annoying to implement, because string operations in C are annoying :)
Note, however, that this means the polygons will not have an associated area.
I think this is OK for all the operations we currently support. New features would require knowing the area, in particular if we started supporting creation of masks. I looked into how the area is calculated in the original code and it would be extremely difficult to port that old fortran code.
A full polygon description would read something like
but there are shortened versions around there like
According to the Mangle manual, anything other than caps is optional:
However, when I try to read a file with shortened description, I get this error:
Failed to read expected string in polygon: 'weight,' got 'weight'failed to read polygon 0
Can the reader be made more forgiving to tolerate these shortened descriptions, given that the optional parts are well meant to be, well, optional?