-
Notifications
You must be signed in to change notification settings - Fork 50
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
base: main
Are you sure you want to change the base?
Harmony 2001 #693
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good - since we added some dependencies we'll want to test harmony in a box to make sure none of the microservices need to add the libraries as well (since they pull in code from services/harmony
it isn't obvious when the libraries will have to be pulled in).
* @param pnt - geojson Point for the center of the circle | ||
* @returns a geojson polygon | ||
*/ | ||
function pointToPolygon(pnt: Feature<Point>): Feature<Polygon, {}> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI that we'll want to do something similar for the EDR radius function in the future - https://opengeospatial.github.io/e-learning/ogcapi-edr/text/radiusquery.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the shapefile from the description. In UAT it returns an error for the shapefile, but locally on this branch my request is submitted successfully.
Harmony in a box failed for query-cmr, work-failer, and work-updater due to missing dependencies (the turf
libraries that were added to the main harmony service also need included in those services). Once harmony in a box is working I am good with merging in this PR.
Fixed |
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
e.g.,
with multipart form parameters
shapefile
andmaxResults
.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
Documentation updated (if needed)