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.
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:
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
These are the parameters of the Http Caller-Transformer:
The answer of the Geocoding Service is a JSON-Object:
{
"suggestions": c{
"text": "Hauptstrasse, 10, München, Stadt",
"magicKey": "GST7YMc0sM9UOsKtGTyVGST7YMc0AM9UOsKJQ5bJEYtvZhcBDSTaObWMHhp0DFckOgc-J5KKQ5dAMNFF",
"isCollection": false
}
]
}
I get the JSON-Object withe the JSONFragmenter:
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.