Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.
/ pzsvc-ndwi-py Public archive

The ndwi shore-finding algorithm, written in python, and made into a Piazza service via pzsvc-exec

License

Notifications You must be signed in to change notification settings

venicegeo/pzsvc-ndwi-py

Repository files navigation

pzsvc-ndwi-py

The ndwi shore-finding algorithm, written in python, and made into a Piazza service via pzsvc-exec

pzsvc-ndwi-py is currently configured as a taskworker/local-only service. As such, it receives external jobs only through the Pz instance indicated at environment variable PZ_ADDR. On startup, assuming all environment variables are set properly and the Pz instance is working, it will autoregister itself with the name "BF_Algo_NDWI_PY", and will stand by to complete any jobs sent to that service. An example of a reasonable, working job block is as follows:

{
  "data": {
    "dataInputs": {
      "body": {
        "content": "{
          \"cmd\":\"-i planet.TIF --bands 2 4 --fout ./shoreline.geojson\",
          \"inPzFiles\":[\"e21e44dc-5ccc-414a-b047-4f45cd44ea2f\"],
          \"inPzNames\":[\"planet.TIF\"],
          \"outGeoJson\":[\"shoreline.geojson\"],
          \"pzAuthKey\":\"******\"
        }",
        "type": "body",
        "mimeType": "application/json"
      }
    },
    "dataOutput": [
      {
        "mimeType": "application/json",
        "type": "text"
      }
    ],
    "serviceId": "570a97f8-0a7e-4bc1-a8d5-ba68c43c56a4"
  },
  "type": "execute-service"
}

auth keys have been removed for obvious reasons, but otherwise, this would be a functional request to send to the POST /job endpoint of the appropriate Pz instance.

Pertinent links:

TODO: revisit the necessity for creating arbitrary throwaway commits to this repo for deploying artifacts to PCF

About

The ndwi shore-finding algorithm, written in python, and made into a Piazza service via pzsvc-exec

Resources

License

Stars

Watchers

Forks

Packages

No packages published