[erlang-questions] Any Erlang GIS software out there?

Reynaldo Baquerizo reynaldomic@REDACTED
Thu Sep 15 18:47:21 CEST 2011


Hi,

>  I'm interested in doing some reverse geocoding (taking lat/long and
> getting nearby cities).  While looking around I've not seen any GIS
> related software written in erlang.  So just wondering if I'm missing
> anything?  Anyone written any GIS related software in Erlang?

I have played a little with it.
A short example:

-export([reverse_geocode/0]).
-define(BASE_URL,
"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/" ++
	    "Locators/ESRI_Geocode_USA/GeocodeServer/reverseGeocode?" ++
	    "location=-117.195681386%2C34.057517097&distance=5&outSR=&f=pjson").

reverse_geocode() ->
    reverse_geocode(?BASE_URL).

reverse_geocode(Url) ->
    {ok, Result} = httpc:request(Url),
    {{_,200,_},_,Body} = Result,
    {_Json} = mochijson2:decode(Body),
    {Data} = proplists:get_value(<<"address">>, _Json),
    Data.

--
Reynaldo



More information about the erlang-questions mailing list