Skip to content

Resolve "BE: MetNO: use intersection polygon in TAC"

Håvard Sollie requested to merge 12-intersected-polygon-enor-enob into master

Closes #12 (closed)

Adds a function that looks up an env variable that returns a number telling the limit of intersection coordinates. The default value is 7 in case the variable is undefined. The variable is set in the docker-compose file in the norwegian backend that installs this project. The value is used instead of the hard-coded number 7 in the condition to use drawn/intersected polygon in Tac.

Test:

  • mvn spring-boot:run
  • In another terminal window, run curl --header "Content-Type: application/json" --request POST --data @./src/test/resources/sigmet-readGeoWebSigmetAndCreateSigmet.json http://localhost:8080/getsigmettac
  • A TAC message using the startGeometry coordinates in src/test/resources/sigmet-readGeoWebSigmetAndCreateSigmet.json is used
  • In the project folder, run export INTERSECTION_POLYGON_LIMIT=21
  • curl --header "Content-Type: application/json" --request POST --data @./src/test/resources/sigmet-readGeoWebSigmetAndCreateSigmet.json http://localhost:8080/getsigmettac
  • A TAC message using the startGeometryIntersect coordinates in src/test/resources/sigmet-readGeoWebSigmetAndCreateSigmet.json is used
Edited by Håvard Sollie

Merge request reports

Loading