cybergis / cybergis-compute-python-sdk

https://cybergis.github.io/cybergis-compute-python-sdk
Apache License 2.0
5 stars 7 forks source link

Supporting Maps as Parameter Inputs #85

Open alexandermichels opened 6 months ago

alexandermichels commented 6 months ago

Feature Request

Describe the solution you'd like Currently, jobs sometimes as for map/location IDs (think FIPS codes/dam IDs) which is not user friendly as many people don't have these memorized. An example is in the Aging Damn job (https://github.com/I-GUIDE/cybergis-compute-damfiminput-connector/blob/main/manifest.json#L25). It would be much more user friendly and visually appealing to be able to provide a GeoJson or some other data format and allow users to specify that information by clicking on the geographic object.

Using the dam id example:

"dam_id": {
  "type": "map_input",
  "require": true,
  "default_value": "0000",
  "mapfile": "https://thisisalink/map.geojson",
  "mapIdColumn": "<column in the geojson with the id to use>"
}

Obviously this could be artitrarily complex, but supporting just a base case of only accepting GeoJSON files and getting the value from a specific column when clicked would be very useful. I believe Furqan has implemented something similar in Jupyter notebook and simply passed the parameter into the show_ui function, that could serve as a starting point.