Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmony 2001 #693

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Harmony 2001 #693

wants to merge 2 commits into from

Conversation

indiejames
Copy link
Contributor

Jira Issue ID

HARMONY-2001

Description

Converts Points and MultiPoints in geojson files to Polygons and MultiPolygons respectively. This fixes a bug where Harmony was attempting to split Points on the antimeridian as part of geojson normalization, but failing because the underlying splitter library doesn't support Points. This change supports Points and MultiPoints that add a radius as well, which EDSC is sending in some cases.

Also snuck in a fix to delete krelay processes when stopping Harmony.

Local Test Steps

Issue a POST request to UAT with the following shapefile

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          -118.2832,
          34.03321
        ]
      },
      "properties": {
        "radius": 136593
      }
    }
  ],
  "properties": {
    "summary": "Shapefile created by Earthdata Search to support spatial subsetting when requesting data from Harmony."
  }
}

e.g.,

https://harmony.uat.earthdata.nasa.gov/C1238544384-EEDTEST/ogc-api-coverages/1.0.0/collections/all/coverage/rangeset/

with multipart form parameters shapefile and maxResults.
The request will fail with an error about attempting to convert the provided shapefile.

Now issue the same request to localhost (after starting with this branch).
You should see the request run and create a job. Don't worry about whether or not you have the correct service deployed, this is just to verify that the shapefile normalization handles the geojson.

I have visually inspected the output of the circle polygon generation and it looks right to me. If you want to see this you can just log the output of normalization in one of the new tests and plot that in a geojson viewer like this one https://geojson.tools/.

PR Acceptance Checklist

  • Acceptance criteria met
  • Tests added/updated (if needed) and passing
  • Documentation updated (if needed)
  • Harmony in a Box tested? (if changes made to microservices)

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.

1 participant