[Qgis-developer] Minor UI issue on Geoprocessing tools → Convex hull

Jorge Gustavo Rocha jgr at di.uminho.pt
Thu Jan 19 06:11:56 PST 2017


Hi devs,

This discussion addresses a minor UI issue in the Convex hull dialog
(under Vector → Geoprocessing tools).

The Convex hull dialog [1] has two independent options, which are:
Field, to create convex hulls by classes
Method: to create a single convex hull or convex hulls by classes

Current issues:

1) If the user selects a field in the first combobox, to create convex
hulls by classes, but leaves the second combobox with the default option
"Create single minimum convex hull", the convex hull is not done by
classes, but for all geometries. Probably it is not what the user wants.

2) If the user does not select a field in the first combobox, but
selects the method "Create convex hulls based on field", the operation
tries to do something, but fails with: "float division by zero".
Obviously this does not make sense, but it is allowed by the interface.

My proposal is to enhance this dialog, to provide a better user
experience with these two related options.

I see two possible alternatives:

a)
* The order of these two fields changes.
* First the user has to select the method.
* The field combobox only gets enabled if the method is "Create convex
hulls based on field" is selected in the Method combobox.
* When the user changes the method back to "Create single minimum convex
hull", the Field combobox is disabled.

b)
* We drop the Method combobox at all,
* We use just one dropbox to select a field
* If no field is selected, the method is "Create single minimum convex
hull".
* If a field is selected, the method is "Create convex hulls based on
field".

I can make a PR to improve this, but I would like to discuss what is the
best approach here.

Regards,

[1] http://webgis.di.uminho.pt/~jgr/convex%20hull%20dialog.png

J. Gustavo
-- 
Jorge Gustavo Rocha
Departamento de Informática
Universidade do Minho
4710-057 Braga
Tel: +351 253604480
Fax: +351 253604471
Móvel: +351 910333888
skype: nabocudnosor


More information about the Qgis-developer mailing list