maproulette / maproulette/maproulette-backend

Endpoint returns invalid geojson: coordinates are strings instead of numbers

Open
#1,050 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi,

An API call to /v2/challenge/view (e.g. https://maproulette.org/api/v2/challenge/view/39519) returns an invalid geojson: the coordinates should be an array of numbers (e.g. [12.34, 5.67]) but this returns an array of strings, containing the numbers (e.g. ["12.34", "5.67"]) causing a whole heap of bugs in my programs.

Example output screenshot:

image

The full response can be found in this zip-file: challenge_geojson.json.zip

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

Begin at the /v2/challenge/view API entry point and reproduce the example request to inspect how its GeoJSON response is produced. Trace the response path and verify that coordinates are returned as numeric values rather than strings, while the full response remains valid GeoJSON.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.