Skip to content

Commit

Permalink
Correct input format from emonk map
Browse files Browse the repository at this point in the history
Change-Id: I10108443b0f862543e3a2723e117ac0926e5309b
  • Loading branch information
daleharvey committed Sep 27, 2011
1 parent dd4e5e1 commit 1cc3251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/geocouch/couch_spatial_updater.erl
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ spatial_docs(Proc, Docs) ->
fun(Doc) -> fun(Doc) ->
% NOTE vmx: perhaps should map_doc renamed to something more % NOTE vmx: perhaps should map_doc renamed to something more
% general as it can be used for most indexers % general as it can be used for most indexers
{ok, FunsResults} = couch_view_server:map(Proc, [Doc]), {ok, [FunsResults]} = couch_view_server:map(Proc, [Doc]),


% the results are a json array of function map yields like this: % the results are a json array of function map yields like this:
% [FunResults1, FunResults2 ...] % [FunResults1, FunResults2 ...]
Expand Down Expand Up @@ -270,7 +270,7 @@ process_results(Results) ->
[process_result(Result)|Acc] [process_result(Result)|Acc]
end, [], Results). end, [], Results).


process_result([{{Geo}, Value}]) -> process_result({{Geo}, Value}) ->
Type = proplists:get_value(<<"type">>, Geo), Type = proplists:get_value(<<"type">>, Geo),
Bbox = case Type of Bbox = case Type of
<<"GeometryCollection">> -> <<"GeometryCollection">> ->
Expand Down

0 comments on commit 1cc3251

Please sign in to comment.