Fri 15 Apr 2016 04:35:00 PM UTC, comment #3:
Looking at the description of the files I am not very sure if the geometry package is the right place.
AFAICS these functions are mainly used for converting (X,Y) or (Lat, Lon) coordinates in mapstructs or geostructs to a form in which they can more easily be plotted, and back. So they may be more useful in the mapping package after all. Sorry for a bit of confusion.
JuanPi, what is your opinion? Does the geometry package use the cell array coordinate format?
@Alex:
=======
Thanks for your contribution.
Contributions like this should go on the patch tracker, not bug tracker.
Looking at polyjoin.m I see a for loop that had better be vectorized to avoid undue CPU time.
shapedraw.m in the mapping package invokes a better construct, I just translated it into 2D for you:
(BTW this trick is actually due to David Bateman)
The reverse operation in polysplit.m should also be amenable to vectorization. I'll have a look at it if no one beats me to it.
Furthermore, would you please follow Octave coding style?
- "A ~= B" should be "A != B"
- "~iscell" => "! iscell"
- two consecutive "|" rather than one
- indent only two spaces instead of four
... and please adapt the texinfo header to mention that X and Y coordinates can be treated as well. The Matlabs docs don't mention that but this is very useful.
Similar goes to polysplit.m.
|