Select to view content in your preferred language

Conceptual Help with GP tool and Map Services

1546
2
10-04-2011 07:04 AM
MarthaSelig1
Emerging Contributor
I'm missing something here and could use a little help, please. I have a large Flex application that consumes about a dozen services. For our query tool, we've been using a querytask to get values for a field, then presenting a list of unique values extracted from the returned data, so the user can create an attribute query. I don't like it, but it works *unless* the full range of values isn't contained in the first 1,000 records returned.

I'd like this to be done with a GP tool, so I published a tool that takes an input layer and a field name and runs the Frequency tool. I simply cannot get this tool to run with layers from a map service and I don't understand the problem and, therefore, how to fix it.

When I try to run it at the REST end point, I get the very helpful Invalid value for parameter X. This is true even for the field name. I've attached images of the model and the REST attempt.

When I pull a map service into ArcMap and try to drag a layer into the model, I can't drop it. I don't get what I don't get. Could someone please explain this to me and tell me how I can run the tool independent of a particular map service?

Thanks,
Martha
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: ajoseph

Martha,

GP service will scale well for the scenario you have described.

A couple of things stood out for me from the screenshot.

1. Though GPFeatureRecordSetLayer has a layer suffix, it doesn't accept layers as input. It accepts featuresets or url to featuresets (which will typically be a query url of a map service). The 10.0 REST API help documentation shows the json format for different parameter datatypes. You can find the appropriate JSON structure and examples for GPFeatureRecordSetLayer datatype in that doc.

2. In the model screenshot, I noticed the parameter 'Input Layer'. Can you verify its datatype? I am assuming it must either be a featueset, featurelayer or featureclass. You cannot drag and drop a map service layer as input to Input Layer parameter because it does not belong to any of the parameter datatype mentioned above.

3. Also, if possible modify the model to point to the datasets on your machine instead of sending features as input across the GP REST service. You could create a query string parameter in your model and filter features before finding frequency. I am saying this because, if you are using features from a REST map service, the default number of features returned by a map service will be 1000 features. Your input features will be limited by the number of features returned by the map service query and it might defeat your initial purpose.

Hope that helps! Let me know how it works for you.
0 Kudos
MarthaSelig1
Emerging Contributor
Monica,

Thanks so much for your reply. I didn't change the subscription options on my post, so I didn't know your response was here until today. As soon as I can get back to that issue, I will review your suggestions and report back.

I truly appreciate your support.

Thanks,
Martha
0 Kudos