Closed TheBB closed 4 years ago
Having linear spline (g2) representation is probably the right decision as the default behaviour. However I would like to draw your attention to splipy.utils.image.image_height which gives a high-order approximation of these kind of datasets.
Would also like a screenshot if you have one to spare since I don't have the option of running it on my windows computer right now.
Okay that's better.
For G2 and STL, the true geometry is generated. For image formats, we fit the input polygon in the relevant coordinate system to a rectangle, either the minimal bounding rectangle or the maximal interior rectangle. There's some scipy logic for finding these. Rotation can be either fixed (to the target coordinate system), aligned with true north (in UTM33N in Trondheim this is about 4.1 degrees east of the positive y-axis), or freely rotated (in which case we'll compute the optimal rotation to get the best fit). The overshoot or shortfall in the area is displayed, along with the rotation. These computations are not extremely fast, but generally okay unless you pick maximal interior rectangle + free rotation, in which case you'll see the UI noticeably lagging.
I've found that a default setting of maximal interior rectangle + north-aligned rotation works pretty well.
This is ready to use now I think. Output in images (choice of color map), G2 or STL.