Skip to content

Fix Provider incorrectly parsing spatial query when input is stringified geometry

Levi Remington requested to merge fix-koop-geometry-query-lr into master

Type of change

  • Bug Fix
  • Feature

Please provide link to gitlab issue or ADR(Architecture Decision Record)

Does this introduce a change in the core logic?

  • [YES/NO]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Does this introduce a breaking change?

  • [YES/NO]

What is the current behavior?

If client sent req.query.geometry in the form of a stringified JSON object: "{xmin:1,xmax:1,ymin:1,ymax:2}", Koop may no longer converts this to an object automatically.

What is the new/expected behavior?

If Provider detects input req.query.geometry to be in the form of a String, and the req.query.geometryType is not wkt, then the Provider will attempt to parse the string (as if it were JSON) into an object.

Have you added/updated Unit Tests and Integration Tests?

NA

Any other useful information

Merge request reports