maproulette / maproulette/maproulette-backend

Select feature in JOSM/ID when geometry is a GeometryCollection

Open
#251 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

BACKLOG
Dominant language
Scala
Stars
53
Forks
39
Avg merge
1d 17h
Merged PRs (30d)
12

Description

Not sure if the selecting of features works at all (#77, #161), but it definitely doesn't work when the geometry type is a GeometryCollection (as in my case). Reason is that this case is missing in the switch at https://github.com/maproulette/maproulette2/blob/master/app/assets/javascripts/mapping.js#L1167-L1180 and https://github.com/maproulette/maproulette2/blob/master/app/assets/javascripts/mapping.js#L1117-L1130.

Also I would suggest to optionally allow something like node_id, way_id, and relation_id instead of or in addition to osmid, to allow setting this more explicitly. Only because the geometry shown is, say a Point, it doesn't mean it must have been created from a node (could be the center of an area, or the point of the only node in a single-node way we are trying to repair for instance.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the selection logic in app/assets/javascripts/mapping.js at the switch blocks around lines 1117-1130 and 1167-1180, then compare how Point, way, and relation geometries are handled. Reproduce selection with a GeometryCollection and verify the requested JOSM/iD behavior; treat the node_id, way_id, and relation_id proposal as a separate scope decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.