Skip to content

Conversation

@wielandb
Copy link

@wielandb wielandb commented Jun 9, 2025

After the discussion in #549 , I have leveraged some newfangled AI tools to implement a direction=-Quest in the way I find acceptable from a UI standpoint.

So... yeah :D It's a quest that asks for the direction=-Value for benches, vending machines, traffic signs and billboards. Are there other things that should be added to this filter?

The rotation indicator always rotates with the map, so you can just orient the arrow to face where the thing is facing on your map without having to think about your map orientation.

Screenshot_2025_06_10_00_25_09_393_de_westnordost_streetcomplete

Screenrecorder-2025-06-10-00-24-08-738.online-video-cutter.com.mp4

@wielandb
Copy link
Author

I am tempted to ping @westnordost to see if this quest would be something for StreetComplete proper. The only downside I see is that this info does not have much use apart from (3D-)rendering. 🤔

Copy link
Collaborator

@westnordost westnordost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, cool UI, and in compose, no less!

There is an open quest request for StreetComplete involving direction, though, for viewpoints: streetcomplete#776

Although, looking at the wiki article for tourism=viewpoint, it sounds like it would be better to (be able to) specify a range than a single direction (plus an "other answer" option to say it is 360 degrees/all directions).
The UI could be very similar to your arrow though. Instead of the arrow, a circular sector is shown. As to how to specify the width of the sector, two ideas:

  • the further away from the center the drag gesture, the wider the sector. (Might be problematic if the circle is too small / too small to the screen border)
  • "painting" it: min and max angle of finger during a single drag is used to determine the range.

Regarding the other elements, I'd tentatively agree that the information is not valuable/meaningful enough to include to StreetComplete:

  • benches: seems to be just for 3D rendering
  • billboards: I expect there won't be any surprises there - they are facing the oncoming cars, like traffic signs. I.e. it is clear from their location in which direction they are facing. (Also, I don't see any other use case than for 3D rendering)
  • traffic signs: see billboards
  • vending machines: 1. I think you could also include ATMs, 2. also wouldn't know a use case for this.

)
}
}
androidx.compose.foundation.Image(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

y no import?

Comment on lines +30 to +31
angle: Float,
onAngleChange: (Int) -> Unit,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

angle is float, but onAngleChange is int?

Also, it is a bit of a problem that angle can not be null. That means, that before even taping any direction, the quest form will report that the form is complete. IIRC this is not standard, the OK button should only appear after the user input something.
A suggestion: either don't display the arrow at all at the beginning or as a sort of hint (with high transparency).

(This widget also probably needs some sort of usage hint. Like e.g. the street side select has: Maybe you can launch an effect on first opening that shows some kind of touch/ripple effect on the widget?)

var deg = Math.toDegrees(atan2(dx.toDouble(), dy.toDouble())).toFloat()
deg = normalizeDegrees(deg + mapRotation)
val snapped = (deg / 5f).roundToInt() * 5
onAngleChange(((snapped % 360) + 360) % 360)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's that? Do you want to make sure that the returned angle is positive? You could use normalizeDegrees

@westnordost
Copy link
Collaborator

westnordost commented Jun 10, 2025

Furthermore, I've looked at taginfo to see for what things this is used. direction is used most of all for solar panels. So, you probably want to include that. Maybe... that could even go into StreetComplete...? 🤔 (Use case: calculate power output).

On the other hand, there might be an uproar among the pea-counters in OpenStreetMap, if the direction of solar panels is specified in degrees rather than cardinal direction, suggesting a very precise measurement, and it turns out the roof the solar panels are on is some degrees off from the roof itself. Well, 🤷, regardless, I guess all solar panels on the southern hemisphere will be somewhat oriented to the south. Although, of course, if the roof itself has no surface directly to the south, it could still be useful information. More importantly, it may be difficult to see from the ground, plus, this is information that could just as well and more easily be recorded from satellite imagery.

@HolgerJeromin
Copy link

it sounds like it would be better to (be able to) specify a range than a single direction (plus an "other answer" option to say it is 360 degrees/all directions).

We could ask before this GUI:

  • 360 degree
  • Add a single angle
  • Add a range

The range would than ask for too angles.

@paulklie
Copy link

paulklie commented Sep 3, 2025

I could also see this being useful for observation towers and mounted binoculars to indicate in which direction you can view stuff in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants