Select to view content in your preferred language

Transfer Explorer Point to ArcGIS Server Geoprocessing Service

2827
9
04-29-2010 05:47 AM
MaryEllen_Perko
Frequent Contributor
Hello.  Does anyone know if there is a sample or something available that can show me how to take a point from ArcGIS Explorer and feed it to a geoprocessing service (that ultimately returns features around that point).  Right now the geoprocessing service (model) takes a Feature Set, but that can change if need be.

Thanks,
Mary Ellen
0 Kudos
9 Replies
MaryEllen_Perko
Frequent Contributor
Hello.  I don't know if anyone is interested in this, but I stumbled upon my solution looking through the ArcGIS Server forum and thought I'd share.

This had most of the information I needed.  Just needed a little tweaking for .net and Explorer.

http://edndoc.esri.com/arcobjects/9.2/Java/java/server/webservices/soap_api/gp_overview.htm

Thanks,
Mary Ellen
0 Kudos
BillHoney
Occasional Contributor
Hi Mary Ellen,

Are you able to share you code?

I'm hoping to code a scenerio exactly as you described

Regards,

Bill
0 Kudos
MaryEllen_Perko
Frequent Contributor
Hi Bill,

Sure. I'm a bit rusty, but hopefully this helps.

I've attached the code for the part of my add-in that takes a point clicked on the map display through setting up the input parameter for the geoprocessing service.  My geoprocessing service (model) only has one input parameter and that is a point feature set.  There may be other ways to do this, but this worked for me.

Let me know if you have any questions.

Best,
Mary Ellen
0 Kudos
BillHoney
Occasional Contributor
Hi Mary Ellen,

How do you include the declaration of your GeoProcessing Service ? (SDVReturnRoadCharTools)

if (_SDVReturnRoadCharToolsGPS == null)
       _SDVReturnRoadCharToolsGPS = new SDVReturnRoadCharTools.SDVReturnRoadCharTools_GPServer();  //get this if we don�??t already have it

Regards, Bill
0 Kudos
MaryEllen_Perko
Frequent Contributor
Hi.  If I understand the question, I use Visual Studio and I just add the Web Reference.  The URL is the wsdl of the geoprocessing web service and I name it SDVReturnRoadCharTools.  For example:

http://<???>/arcgis/services/ncdot_sdvtools/SDVReturnRoadCharTools/GPServer?wsdl

Then, in the code I've got this:

        SDVReturnRoadCharTools.SDVReturnRoadCharTools_GPServer _SDVReturnRoadCharToolsGPS;


Hope that helps.

Best,
Mary Ellen
0 Kudos
BillHoney
Occasional Contributor
Yes, thats exactly what I meant - thanks!
I had missed that key step.

Now all I need is to convert my returned feature class (GPFeatureRecordSetLayer) into something that can be added to the map.  Any clues ?

I can't seem to find any documentation on any of this stuff.  Is it just me?  

Regards,  Bill
0 Kudos
MaryEllen_Perko
Frequent Contributor
Hi.  I can provide you the bits of code that I created to convert the returned features into notes, but if you are using version 10, I think there are other options you may want to explore.  The notes solution can be a bit cumbersome for users.  We're not using 10 yet, so I can't offer anything more.

Anyway, I've attached the code.  Hope it helps.

Thanks,
Mary Ellen
0 Kudos
BillHoney
Occasional Contributor
Hi Mary Ellen,

Thank you so much for that,  you�??ve  been enormously helpful.  I now have it working. 🙂

Out of interest, what are the  newer features you are refering to ?

Regards,

Bill
0 Kudos
MaryEllen_Perko
Frequent Contributor
Bill,

Glad I could help.  And sorry I was so vague about "newer features."  Someone posted some suggestions to another related question I had last year.  His suggestions included taking advantage of the ability to use layer packages as geoprocessing output in 10.  I haven�??t looked into it at all since we haven't implemented 10 yet, but it may be worth some investigative time.  There may be other options, too.  I don't know...

Anyway, if it helps, here�??s the other thread:   http://forums.arcgis.com/threads/3160-Convert-GPFeatureRecordsetLayer-to-FeatureLayer?p=155871#post1...

Best,
Mary Ellen
0 Kudos