We published a GP 10.1 service to take address in csv format and geocodes it for display on a map. But we couldn't get it to work. We always get error back when submiting it - "esriJobFailed". I think it could be that we passing in a wrong input format.Does anyone have a sample on this input parameter format?
Thanks, -atip
Solved! Go to Solution.
Thanks All, we already found the answer. A co-worker here shows me the correct input format. This is how the input string looks:
{
"displayFieldName": "",
"fields": [
{
"name": "Street",
"type": "esriFieldTypeString",
"alias": "Street",
"length": 255
},
{
"name": "City",
"type": "esriFieldTypeString",
"alias": "City",
"length": 255
},
{
"name": "State",
"type": "esriFieldTypeString",
"alias": "State",
"length": 255
},
{
"name": "Zip",
"type": "esriFieldTypeDouble",
"alias": "Zip"
},
{
"name": "Attribute1",
"type": "esriFieldTypeString",
"alias": "Attribute1",
"length": 255
},
{
"name": "Attribute2",
"type": "esriFieldTypeString",
"alias": "Attribute2",
"length": 255
},
{
"name": "Attribute3",
"type": "esriFieldTypeString",
"alias": "Attribute3",
"length": 255
},
{
"name": "ObjectId",
"type": "esriFieldTypeOID",
"alias": "ObjectId"
}
],
"features": [{
"attributes": {
"Street": "114 Lathrop Ave",
"City": "Forest Park",
"State": "IL",
"Zip": 60130,
"Attribute1": "test1",
"Attribute2": "test2",
"Attribute3": "test3"
}
},
{
"attributes": {
"Street": "118 Lathrop Ave",
"City": "Forest Park",
"State": "IL",
"Zip": 60130,
"Attribute1": "test1",
"Attribute2": "test2",
"Attribute3": "test3"
}
}
],
"exceededTransferLimit": false
}
Again, thanks all
You say it is taking CSV format and geocoding, so I would think you need:
123 sesame st, albquuerque, nm, 87102
246 beat street, new york, ny, 1234
or whatever format your geocoder requires.
Thank you, Paul. But I did try that similar format but still no luck - not working. I ain't even sure if this service is good for CSV, because in the description it says "Excel spreadsheet to geocode" - see image.
Has anyone successfully tried this type of service on CSV format? I looked at the ESRI Input XLS example on the service "Submit Job" page - see below.
But I don't know how to construct my addresses input in that format. Has anyone done this?
Thanks in advance, -atip
Thanks All, we already found the answer. A co-worker here shows me the correct input format. This is how the input string looks:
{
"displayFieldName": "",
"fields": [
{
"name": "Street",
"type": "esriFieldTypeString",
"alias": "Street",
"length": 255
},
{
"name": "City",
"type": "esriFieldTypeString",
"alias": "City",
"length": 255
},
{
"name": "State",
"type": "esriFieldTypeString",
"alias": "State",
"length": 255
},
{
"name": "Zip",
"type": "esriFieldTypeDouble",
"alias": "Zip"
},
{
"name": "Attribute1",
"type": "esriFieldTypeString",
"alias": "Attribute1",
"length": 255
},
{
"name": "Attribute2",
"type": "esriFieldTypeString",
"alias": "Attribute2",
"length": 255
},
{
"name": "Attribute3",
"type": "esriFieldTypeString",
"alias": "Attribute3",
"length": 255
},
{
"name": "ObjectId",
"type": "esriFieldTypeOID",
"alias": "ObjectId"
}
],
"features": [{
"attributes": {
"Street": "114 Lathrop Ave",
"City": "Forest Park",
"State": "IL",
"Zip": 60130,
"Attribute1": "test1",
"Attribute2": "test2",
"Attribute3": "test3"
}
},
{
"attributes": {
"Street": "118 Lathrop Ave",
"City": "Forest Park",
"State": "IL",
"Zip": 60130,
"Attribute1": "test1",
"Attribute2": "test2",
"Attribute3": "test3"
}
}
],
"exceededTransferLimit": false
}
Again, thanks all