AnsweredAssumed Answered

I need to do a distance operation based on parameters passed in via a REST call from a website

Question asked by gcooke76 on Mar 2, 2017
Latest reply on Mar 9, 2017 by gcooke76



I have a requirement for one of our IT Services to direct users to the nearest location which meets their requirements. The user will input their requirements and based on that be recommended a list of suitable locations. I then need to provide distances to those recommended locations, recommend the user goes to the nearest one, but allow them the option to go to one of the others. The website they use for this is not built on top of GIS.


what I want to do is pass the postcode of the users location and the list of recommended locations to a geoprocessing service published as a REST end point on our GIS server and have that service do the "distance crunching" and return the results of each appropriate location and distance to it in stacked order nearest to furthest.


This sounds pretty straight forward, but I am not very experienced with geoprocessing tools and model builder and am not sure how to get a model to accept parameters passed in via a REST call and create an output that can be read back into the calling service via JSON.


I'm sure other people must have done something similar before and I have google around but I am either not getting the google search terms right or the result I want is buried too far down the list, but I am having trouble finding examples/tutorials of how to do what I want.


Can anyone point me in the right direction please?