Question

geocode adresses with own arcgis geocoding service


Hi,

i want to geocode addresses by my own ArcGIS Server geocoding service. The adresses are in a csv-format. In a second step I have transform the adresses from csv in to JSON. After that i want to get the geocoded adress via the HTTP-Caller because it is not possible to post adresses via the Geocoder-Transformer in the JSON-Format.

It doesn`t helped me to post the address in a single LineString.

Can anyone help me to geocode the adresses?


3 replies

Badge +3

I do think you should be using the Geocoder-transformer. However the address should be added as a comma seperated list, according to the Help. E.g. '123 Main Street, Surrey, BC, Canada'.

I don't know whether you have a particalur reason to provide the addresses as JSON, but does not seem to be helpfull.

If this doesn't help, it would be helpfull to provide more details, such as an example of the LineString you are trying to post.

Hope this helps you forward.

Userlevel 4

I agree with Lars. It would also help if you could tell us exactly which API endpoint you're trying to access on your ArcGIS Server. If you can provide a direct link to the endpoint documentation that would be even better.

The key here is to understand exactly what your API endpoint expects and then to adapt your workspace accordingly.

Thanks for your answers.

Here is an exsample for the format of the adresses that i want to geocode:

StreetnameHouse NumberCityHauptstrasse10München, Stadt

 

This is the Adress in CSV-Format (with Delimiter Character ";"  ):

Hauptstrasse;10;München, Stadt 

 The geocoder-Tranformer want the adress in a single Line String Format. I connect the three attributes to one attribute with the StringConcatenator-Transformer and fill the Field "Street Adress" in the Geocoding Parameters:

0684Q00000ArKXUQA3.jpg

The Geocoder reject the adress but it cannot find the adress. I think tha the source of error is the city. 

The Geocoder seperates the adress by the comma -> Hauptstrasse, 10, München, Stadt

 

The addition of ", Stadt" is truncated 

 

The Geocoding service expect "Hauptstrasse 10 München, Stadt"

This is the reason that i can`t use the Geocoder-Transformer.

Now i have a solution for that problem. 

I use the Http Caller-Transformer and requested the adress from the ArcGISGeocoding Service.

I put the the URL, the adressstring and the outputformat in one Attributefield with the String Concatenator-Transformer

0684Q00000ArKORQA3.jpg

These are the parameters of the Http Caller-Transformer:

0684Q00000ArKaIQAV.jpg

The answer of the Geocoding Service is a JSON-Object:

{
    "suggestions": [{
            "text": "Hauptstrasse, 10, München, Stadt",
            "magicKey": "GST7YMc0sM9UOsKtGTyVGST7YMc0AM9UOsKJQ5bJEYtvZhcBDSTaObWMHhp0DFckOgc-J5KKQ5dAMNFF",
            "isCollection": false
        }
    ]
}

I get the JSON-Object withe the JSONFragmenter:

0684Q00000ArK6fQAF.jpg

and extract the "magicKey" by the AttributeExposer-Transformer.

You must request a findAdressCandidates-request to the Geocoding Service (Dokumentation of findAdressCandidates request of ArcGIS GeocodingService REST API) by the HTTP Caller Transformer and commit the magicKey to get the coordinates of the  Adress. 

This is the same procedure that i discribed above.

I hope this helps anyone who had the same problem.

Reply