UFOID / UFO-Detector

UFO Detector
http://ufoid.net/
GNU General Public License v3.0
54 stars 8 forks source link

Change detection area file format to polygon-based #46

Closed hekkup closed 7 years ago

hekkup commented 7 years ago

Currently the detection area file is point-based. Is there any important reason for that? I would suggest we changed it to polygon-based. There would be several benefits from it. Polygon-based file format would be faster to save and load. The file could be edited by hand (I'm thinking about CLI based usage). Polygons could be also managed by the detection area edit dialog much easier, e.g. there would be no need to re-define the area each time and it would be possible to edit the polygon in the editor.

UFOID commented 7 years ago

I didn't consider a polygon-based approach before but I agree with the advantages you listed. I am not sure I understand what you mean with "need to re-define the area each time". The only time the user has to re-define the area is when changing the camera resolution (or when changing the camera view/position obviously). I guess the advantages with a polygon-based approach is that it could just scale it automatically according to the resolution.

hekkup commented 7 years ago

I mean you can't edit the area once it has been defined. If you want different area, you need to create a new one. For editing, polygon-based approach would work better for both code and for usage.