GP 10.1 service to take address in csv format and geocodes it for display on a map

3511
3
Jump to solution
09-18-2014 11:58 AM
AtipChaogunhar
New Contributor II

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

geo_excel.png

0 Kudos
1 Solution

Accepted Solutions
AtipChaogunhar
New Contributor II

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

View solution in original post

0 Kudos
3 Replies
PaulCrickard1
Occasional Contributor II

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.

AtipChaogunhar
New Contributor II

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. 

geo_excel_descp.png

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.

ESRI_input_example.png

But I don't know how to construct my addresses input in that format. Has anyone done this?

Thanks in advance, -atip

0 Kudos
AtipChaogunhar
New Contributor II

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

0 Kudos