ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

[Draw area] Don't allow user to draw mis-shapen polygons

Open gino-m opened this issue 1 year ago • 3 comments

Do not allow self-intersecting polygons to be added

@rawbzz @amegantz Should we show a message when "Add point" is tapped and reject the new vertex?

gino-m avatar Aug 05 '24 15:08 gino-m

After rejecting the vertex, maybe we show a toast/snackbar and say something like:

  • "The edges of an area can't overlap with other edges from the same area"
  • "Areas can't intersect with themselves"
  • "Area perimeter can't intersect with itself"

WDYT?

amegantz avatar Aug 17 '24 01:08 amegantz

  • "Area perimeter can't intersect with itself"

I vote for 3, possibly removing the term "area", which we no longer mention during the data collection flow, so:

"Perimeter can't intersect with itself"

gino-m avatar Aug 19 '24 14:08 gino-m

Works for me

amegantz avatar Aug 21 '24 18:08 amegantz

I have one option where its a popup toast and one thats more like a dialog

Image

rawbzz avatar Dec 06 '24 19:12 rawbzz

I have one option where its a popup toast and one thats more like a dialog

Image

Thanks, @rawbzz. Both options look good, I'm leaning towards the second option since it provides an explicit way of dismissing the message which isn't close to the "Add point" tap target, helping to mitigate accidental taps.

Assuming the 2nd option, I would update the label - the current label sounds like tapping might add a point. Perhaps a simple "Ok" would be better (@amegantz)

gino-m avatar Dec 06 '24 19:12 gino-m

agreed i like the second option

rawbzz avatar Dec 13 '24 16:12 rawbzz

Thanks @rawbzz , updated the PR description accordingly.

gino-m avatar Dec 13 '24 17:12 gino-m

@anandwana001 To update PR so that check happens when "Add point" or "Continue" are clicked.

gino-m avatar Mar 13 '25 14:03 gino-m