gaia
gaia copied to clipboard
Refactor request parsing
@aashish24 This is in regards to your suggestion yesterday to refactor how/where request parsing takes place, could you provide some more details? I think you mentioned having request JSON parsed by the process object itself? But the request parser in it's current state is responsible for actually creating the process.
Here is an example of the current request parser being used in Girder:
@kotfic I replaced the GaiaRequestParser with a slightly modified version of your custom_json_deserialize JSON function in the postgis branch, and modified the request JSON accordingly. Example:
{
"_type": "gaia.geo.processes_vector.WithinProcess",
"inputs": [
{
"_type": "gaia.inputs.VectorFileIO",
"name": "first",
"uri": "{basepath}/iraq_hospitals.geojson"
},
{
"_type": "gaia.inputs.ProcessIO",
"process": {
"_type": "gaia.geo.processes_vector.BufferProcess",
"buffer_size": 1000,
"name": "buffer",
"inputs": [
{
"_type": "gaia.inputs.VectorFileIO",
"uri": "{basepath}/iraq_roads.geojson",
"filters": [
["type","=","motorway"]
]
}
]
}
}
]
}
https://github.com/OpenDataAnalytics/gaia/pull/58
@mbertrand sorry for the turn around time on review. Looked at deserialize function in the postgis branch and it looks good to me. Once that's in i think we can close this.