 
   defp get_coordinates_from_gazetteer(gazetteer_id) do
       Gazetteer.get_place(gazetteer_id)
+      |> Utils.atomize
       |> get_coordinates_from_place
   end
 

defmodule Enricher.Gazetteer do
  alias Services.Gazetteer

  def add_coordinates(change = %{ doc: %{ resource: %{ gazId: gazId, category: "Project" }}}) do
      coordinates = get_coordinates_from_gazetteer(gazId)

  defp get_coordinates_from_place(%{ prefLocation: %{ coordinates: [longitude, latitude] }}) do
      [longitude, latitude]
  end
  defp get_coordinates_from_place(_place) do

    Logger.error "Failed to retrieve coordinates from gazetteer place, coordinates field is missing."
    nil
  end

end
